上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 55 下一页
摘要: Module ngx_stream_core_module (nginx.org) load_module /usr/lib64/nginx/modules/ngx_stream_module.so; stream { error_log stream.log debug; server { lis 阅读全文
posted @ 2022-05-21 21:49 ascertain 阅读(160) 评论(0) 推荐(0) 编辑
摘要: https://downloads.apache.org/directory/KEYS 阅读全文
posted @ 2022-05-21 21:39 ascertain 阅读(21) 评论(0) 推荐(0) 编辑
摘要: Core functionality (nginx.org) 阅读全文
posted @ 2022-05-21 20:12 ascertain 阅读(8) 评论(0) 推荐(0) 编辑
摘要: Quick start | Python | gRPC 阅读全文
posted @ 2022-05-21 19:42 ascertain 阅读(35) 评论(0) 推荐(0) 编辑
摘要: Module ngx_http_v2_module (nginx.org) 阅读全文
posted @ 2022-05-21 19:11 ascertain 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-05-21 18:22 ascertain 阅读(28) 评论(0) 推荐(0) 编辑
摘要: Module ngx_http_core_module (nginx.org) open_file_cache max=10 inactive=60s; open_file_cache_min_uses 1; open_file_cache_valid 60s; open_file_cache_er 阅读全文
posted @ 2022-05-21 18:09 ascertain 阅读(74) 评论(0) 推荐(0) 编辑
摘要: Module ngx_http_slice_module (nginx.org) proxy_cache introspect; slice 1m; # 每次向upstream请求1m proxy_cache_key $uri$is_args$args$slice_range; proxy_set_ 阅读全文
posted @ 2022-05-21 17:13 ascertain 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-05-20 22:54 ascertain 阅读(22) 评论(0) 推荐(0) 编辑
摘要: # # proxy_cache # # proxy_cache_path 必须位于http块, levels 指定缓存空间三层目录, 200m指内存缓存空间, max_size硬盘缓存空间 proxy_cache_path /var/cache/nginx/proxy levels=2:2:2 ke 阅读全文
posted @ 2022-05-20 21:52 ascertain 阅读(59) 评论(0) 推荐(0) 编辑
摘要: https://github.com/go-redis/redis package main import ( "context" "fmt" "time" "github.com/go-redis/redis/v8" ) var ( ctx context.Context rdb *redis.C 阅读全文
posted @ 2022-05-20 17:47 ascertain 阅读(24) 评论(0) 推荐(0) 编辑
摘要: Server: package main import ( "fmt" "net" ) func main() { fmt.Println("net.Listen") listen, err := net.Listen("tcp", "0.0.0.0:5555") if err != nil { f 阅读全文
posted @ 2022-05-20 16:51 ascertain 阅读(20) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "reflect" ) type Vale struct { Name string `json:"name,omitempty"` Age int `json:"vale_age,omitempty"` Score float32 `json 阅读全文
posted @ 2022-05-20 15:31 ascertain 阅读(24) 评论(0) 推荐(0) 编辑
摘要: https://stackoverflow.com/questions/31650192/whats-the-full-name-for-iota-in-golang 一个常量块中,一个常量没有赋值,取上个常量的值 iota从0开始,每行++ 不推荐使用iota 阅读全文
posted @ 2022-05-20 12:12 ascertain 阅读(15) 评论(0) 推荐(0) 编辑
摘要: func TypeAssert(items ...interface{}) { for i, v := range items { switch v.(type) { case bool: fmt.Printf("index: %d, type: %T, value: %v\n", i, v, v) 阅读全文
posted @ 2022-05-19 23:02 ascertain 阅读(15) 评论(0) 推荐(0) 编辑
摘要: channel不能使用for循环动态遍历 package main import ( "fmt" ) func main() { intChan := make(chan int, 10) for b := 0; b < cap(intChan); b++ { intChan <- b + 100 阅读全文
posted @ 2022-05-19 22:48 ascertain 阅读(19) 评论(0) 推荐(0) 编辑
摘要: func GetGoroutineId() (n uint64) { vail := make([]byte, 1024) vail = vail[:runtime.Stack(vail, true)] fmt.Println(string(vail)) vail = bytes.TrimPrefi 阅读全文
posted @ 2022-05-19 20:02 ascertain 阅读(22) 评论(0) 推荐(0) 编辑
摘要: Polymorphic Array: package main import ( "fmt" ) type USB interface { Start() Stop() } type Phone struct { Name string } func (p *Phone) Start() { fmt 阅读全文
posted @ 2022-05-18 18:40 ascertain 阅读(15) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "math/rand" "sort" "time" ) // Vale Vale结构体 type Vale struct { Name string Age int } func (vale Vale) String() string { re 阅读全文
posted @ 2022-05-18 18:22 ascertain 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 结构体的接口实现方法参数为指针类型时,会报编译错误 package main type USB interface { method() } type Vale struct { } func (vale *Vale) method() { // 指针类型 println("vale method" 阅读全文
posted @ 2022-05-18 16:40 ascertain 阅读(15) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 55 下一页