Golang
文章平均质量分 67
CWill_
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
channel 与 并行化
创建channel时,可以制定chanel的缓存: c := make(chan int) 这种情况下缓存为1 c := make(chan int, num) 创建缓存为num的channel 为了灵活控制程序中协程的个数,可以通过创建一个带缓存的channel,在启动一个新的goroutine时,往channel中写入一个数据,然后在协程完成的时候读出来,实现控制协程个数原创 2017-07-25 15:55:08 · 404 阅读 · 0 评论 -
一致性哈希consistent
一致性哈希package consistent import “stathat.com/c/consistent” github地址stathat/consistent 一致性哈希package consistent Type Consistent func New func (*Consistent) Add func (*Consistent) Get func (*Consis...原创 2018-05-30 14:48:08 · 664 阅读 · 0 评论 -
Go Http
Go HTTP库 Go HTTP库 概述 type Client type Request type Response type Client type Handler type Server 其他函数 func Get(url string) (resp *Response, err error) func Handle(pattern string, handler Handler) f...原创 2018-06-01 15:33:50 · 942 阅读 · 0 评论
分享