当前位置: 首页 > news >正文

php可以做网站公司seo是什么职位

php可以做网站,公司seo是什么职位,深圳市官网网站建设,外贸网站做多少钱的数据采集 我们可以通过HTTP/gRPC与deviceShifu进行通信,deviceShifu会将我们发送的请求转换成设备所支持协议的形式,并发送给设备。 当设备接收到指令之后,数据会传输到deviceShifu中,之后deviceShifu将数据作为我们请求的返回值…

数据采集

我们可以通过HTTP/gRPC与deviceShifu进行通信,deviceShifu会将我们发送的请求转换成设备所支持协议的形式,并发送给设备。

当设备接收到指令之后,数据会传输到deviceShifu中,之后deviceShifu将数据作为我们请求的返回值进行返回,从而实现数据的采集。

实现自动化数据采集

1.首先,我们可编写以下程序来实现自动采集数据。该程序用于对之前运行的edgedevice-thermometer设备进行实时数据采集,将温度数据进行解析并输出。该程序可以通过任意语言、任意形式进行编写,您可以将数据存入您的数据库中,或者存入文件中。

package main  import (  "log"   "io/ioutil"   "net/http"   "strconv"   "time"
)  func main() {  targetUrl := "http://edgedevice-thermometer/read_value"req, _ := http.NewRequest("GET", targetUrl, nil)for{res, _ := http.DefaultClient.Do(req)body, _ := ioutil.ReadAll(res.Body)temperature, _ := strconv.Atoi(string(body))     if temperature > 20 {log.Println("High temperature:", temperature)} else if temperature > 15 {log.Println("Normal temperature:", temperature)} else {log.Println("Low temperature:", temperature)}res.Body.Close()time.Sleep(2 * time.Second)}
}

2.使用go mod init high-temperature-detecto生成go.mod文件。

3.对于上述程序,我们可以将其打包成docker image并加载到集群中,以便其能更好的与deviceShifu进行通信。创建以下Dockerfile文件:

# syntax=docker/dockerfile:1  FROM golang:1.17-alpine  
WORKDIR /app  
COPY go.mod ./  
RUN go mod download  
COPY *.go ./  
RUN go build -o /high-temperature-detector  
EXPOSE 11111  
CMD [ "/high-temperature-detector" ]

4.使用Dockerfile文件生成docker image,需执行以下命令:

docker build --tag high-temperature-detector:v0.0.1

5.之后我们将docker image加载到集群中,需执行以下命令:

kind load docker-image high-temperature-detector:v0.0.1

6.运行我们编写的数据采集程序 ,需执行以下命令:

kubectl run high-temperature-detector --image=high-temperature-detector:v0.0.1

7.最后我们查看该程序的日志信息获取数据,需执行以下命令:

kubectl logs high-temperature-detector -f

得到的数据结果如下:

2021/10/18 10:35:35 High temperature: 24  
2021/10/18 10:35:37 High temperature: 23  
2021/10/18 10:35:39 Low temperature: 15  
2021/10/18 10:35:41 Low temperature: 11  
2021/10/18 10:35:43 Low temperature: 12  
2021/10/18 10:35:45 High temperature: 28  
2021/10/18 10:35:47 Low temperature: 15  
2021/10/18 10:35:49 High temperature: 30  
2021/10/18 10:35:51 High temperature: 30  
2021/10/18 10:35:53 Low temperature: 15

本文由边无际授权发布

http://www.hkea.cn/news/930805/

相关文章:

  • 网站右侧浮动广告代码百度推广代理公司广州
  • 固原建站公司旺道seo推广系统怎么收费
  • 适合做外链的网站海外广告联盟平台推广
  • 建筑模板规格型号郑州厉害的seo顾问
  • ppt做书模板下载网站有哪些内容国际婚恋网站排名
  • 上海网站建设内容更新网络营销策划目的
  • 重庆市建设信息网站关键词查询网
  • 做哪种网站流量大怎么打广告宣传自己的产品
  • 免费表白网站制作seo网络优化推广
  • 网站建设中可能升级中国科技新闻网
  • 网站制作内容文案网站如何快速被百度收录
  • 淘宝淘宝网页版登录入口免费seo公司
  • 竹溪县县建设局网站短视频营销
  • 好的网站有哪些搜索引擎seo是什么意思
  • 做音乐网站赚钱吗做小程序的公司
  • 坪地网站建设域名流量查询工具
  • 网站建设部署万能推广app
  • 网站的重要性怎么做个网站
  • 做网站的经验百度旗下有哪些app
  • 化工网站开发推广点击器
  • 怎么访问日本竹中建设网站外贸seo推广
  • 惠阳建设局网站引流推广接单
  • 北京通州网站建设公司如何建立公司网站网页
  • 网站换程序301seo优化按天扣费
  • html5 网站自适应长尾关键词挖掘爱站工具
  • 网站设计公司(信科网络)潍坊网站定制模板建站
  • 番禺网站开发报价百度竞价排名软件
  • 做企业网站接单seo网站优化技术
  • 建设网站行业云网络推广理实一体化软件
  • 如何用自己公司网站做邮箱关键字是什么意思