ZhangZhihui's Blog  
上一页 1 ··· 84 85 86 87 88 89 90 91 92 ··· 102 下一页

2023年9月27日

摘要: package main import ( "fmt" "sync" "time" ) var workers = 3 func processItem(input <-chan int, output chan<- int, wg *sync.WaitGroup) { for { fmt.Prin 阅读全文
posted @ 2023-09-27 16:56 ZhangZhihuiAAA 阅读(14) 评论(0) 推荐(0)
 
摘要: main.go: package main import "fmt" func main() { ch := make(chan int) ch <- 1 a := <-ch fmt.Println(a) } Got error: zzh@ZZHPC:/zdata/MyPrograms/Go/tes 阅读全文
posted @ 2023-09-27 16:18 ZhangZhihuiAAA 阅读(32) 评论(0) 推荐(0)

2023年9月26日

摘要: Within the Kubernetes deployment environment, applications will actually be sent the SIGTERM signal first if it has been decided the pod holding the a 阅读全文
posted @ 2023-09-26 23:00 ZhangZhihuiAAA 阅读(11) 评论(0) 推荐(0)

2023年9月25日

摘要: The concept of microservices is simply breaking a single large potential service into many smaller services that work together, hence, the name. One v 阅读全文
posted @ 2023-09-25 19:45 ZhangZhihuiAAA 阅读(32) 评论(0) 推荐(0)
 
摘要: docker-compose.yaml: version: '3.3' services: nginx: image: nginx:latest ports: - 8080:80 With regards to the preceding docker-compose file, we have t 阅读全文
posted @ 2023-09-25 11:35 ZhangZhihuiAAA 阅读(105) 评论(0) 推荐(0)
 
摘要: Install using the repository Set up the repository. Find distro-specific instructions in: Ubuntu | CentOS | Debian | Raspberry Pi OS | Fedora | RHEL | 阅读全文
posted @ 2023-09-25 10:50 ZhangZhihuiAAA 阅读(60) 评论(0) 推荐(0)

2023年9月23日

摘要: Dockerfile: FROM golang:latest WORKDIR /app ADD . . RUN go env -w GOPROXY=https://goproxy.io,direct RUN go get RUN go build -o app . CMD ["/app/app"] 阅读全文
posted @ 2023-09-23 17:41 ZhangZhihuiAAA 阅读(788) 评论(0) 推荐(1)

2023年9月22日

摘要: In order to access the nginx from our workstation, we would need to expose the port 80 from within the nginx container to our workstation. Run the ngi 阅读全文
posted @ 2023-09-22 21:28 ZhangZhihuiAAA 阅读(39) 评论(0) 推荐(0)
 
摘要: The systemd tool fits our simple case of requiring the application to start on server boot-up as well as ensuring that the application is restarted in 阅读全文
posted @ 2023-09-22 10:01 ZhangZhihuiAAA 阅读(25) 评论(0) 推荐(0)

2023年9月21日

摘要: Original implementation: type SingleItem struct { Field string `json:"field"` Hour int `json:"hour"` Minute int `json:"minute"` ItemCode string `json: 阅读全文
posted @ 2023-09-21 11:14 ZhangZhihuiAAA 阅读(11) 评论(0) 推荐(0)
上一页 1 ··· 84 85 86 87 88 89 90 91 92 ··· 102 下一页