• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






张伯雨

学习使人快乐
 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

随笔分类 -  nsq

1 2 3 4 下一页

 
authorizations.go
摘要:package authimport ( "errors" "fmt" "log" "net/url" "regexp" "time" "github.com/nsqio/nsq/internal/http_api")type Authorization struct { Topic string `json:"topic"` ... 阅读全文
posted @ 2017-08-31 11:37 张伯雨 阅读(329) 评论(0) 推荐(0)
req_params.go
摘要:package http_apiimport ( "fmt" "log" "net" "net/http" "strings" "github.com/nsqio/nsq/internal/app")type logWriter struct { app.Logger}func (l logWriter) Write(p []byte) (int, err... 阅读全文
posted @ 2017-08-31 11:37 张伯雨 阅读(266) 评论(0) 推荐(0)
top_channel_args.go
摘要:package http_apiimport ( "fmt" "log" "net" "net/http" "strings" "github.com/nsqio/nsq/internal/app")type logWriter struct { app.Logger}func (l logWriter) Write(p []byte) (int, err... 阅读全文
posted @ 2017-08-31 11:37 张伯雨 阅读(151) 评论(0) 推荐(0)
http_server.go
摘要:package http_apiimport ( "fmt" "log" "net" "net/http" "strings" "github.com/nsqio/nsq/internal/app")type logWriter struct { app.Logger}func (l logWriter) Write(p []byte) (int, err... 阅读全文
posted @ 2017-08-31 11:34 张伯雨 阅读(210) 评论(0) 推荐(0)
compress.go
摘要:// Copyright 2013 The Gorilla Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.// copied from https://github.com/goril... 阅读全文
posted @ 2017-08-31 11:33 张伯雨 阅读(215) 评论(0) 推荐(0)
api_response.go
摘要:package http_apiimport ( "encoding/json" "fmt" "io" "net/http" "time" "github.com/julienschmidt/httprouter" "github.com/nsqio/nsq/internal/app")type Decorator func(APIHandler) API... 阅读全文
posted @ 2017-08-31 11:28 张伯雨 阅读(336) 评论(0) 推荐(0)
api_request.go
摘要:package http_apiimport ( "crypto/tls" "encoding/json" "fmt" "io/ioutil" "net" "net/http" "net/url" "strconv" "strings" "time")type deadlinedConn struct { Timeout time.... 阅读全文
posted @ 2017-08-31 11:27 张伯雨 阅读(302) 评论(0) 推荐(0)
logger.go
摘要:package app//日志接口type Logger interface { Output(maxdepth int, s string) error} 阅读全文
posted @ 2017-08-31 11:26 张伯雨 阅读(143) 评论(0) 推荐(0)
string_array.go
摘要:package appimport ( "strings")type StringArray []stringfunc (a *StringArray) Set(s string) error { *a = append(*a, s) return nil}func (a *StringArray) String() string { return strings.Join... 阅读全文
posted @ 2017-08-31 11:26 张伯雨 阅读(199) 评论(0) 推荐(0)
float_array.go
摘要:package appimport ( "fmt" "log" "sort" "strconv" "strings")//这个文件相关的代码不需要解释了吧!!!type FloatArray []float64func (a *FloatArray) Set(param string) error { for _, s := range strings.Spli... 阅读全文
posted @ 2017-08-31 11:25 张伯雨 阅读(200) 评论(0) 推荐(0)
types.go
摘要:package clusterinfoimport ( "encoding/json" "fmt" "sort" "strings" "time" "github.com/blang/semver" "github.com/nsqio/nsq/internal/quantile")type ProducerTopic struct { Topic ... 阅读全文
posted @ 2017-08-31 11:24 张伯雨 阅读(287) 评论(0) 推荐(0)
data.go
摘要:package clusterinfoimport ( "fmt" "net" "net/url" "sort" "strconv" "strings" "sync" "github.com/blang/semver" "github.com/nsqio/nsq/internal/http_api" "github.com/nsqio/n... 阅读全文
posted @ 2017-08-31 11:23 张伯雨 阅读(256) 评论(0) 推荐(0)
dirlock_windows.go
摘要:package dirlocktype DirLock struct { dir string}func New(dir string) *DirLock { return &DirLock{ dir: dir, }}func (l *DirLock) Lock() error { return nil}func (l *DirLock) Unlock() e... 阅读全文
posted @ 2017-08-31 11:22 张伯雨 阅读(220) 评论(0) 推荐(0)
tcp.go
摘要:package nsqdimport ( "io" "net" "github.com/nsqio/nsq/internal/protocol")type tcpServer struct { ctx *context}func (p *tcpServer) Handle(clientConn net.Conn) { p.ctx.nsqd.logf("TCP: new... 阅读全文
posted @ 2017-08-31 11:21 张伯雨 阅读(203) 评论(0) 推荐(0)
dirlock.go
摘要:// +build !windowspackage dirlockimport ( "fmt" "os" "syscall")type DirLock struct { dir string f *os.File}func New(dir string) *DirLock { return &DirLock{ dir: dir, }}fu... 阅读全文
posted @ 2017-08-31 11:21 张伯雨 阅读(152) 评论(0) 推荐(0)
statsd.go
摘要:package nsqdimport ( "fmt" "math" "runtime" "sort" "time" "github.com/nsqio/nsq/internal/statsd")type Uint64Slice []uint64func (s Uint64Slice) Len() int { return len(s)}func (s Ui... 阅读全文
posted @ 2017-08-31 11:20 张伯雨 阅读(443) 评论(0) 推荐(0)
stats.go
摘要:package nsqdimport ( "sort" "sync/atomic" "github.com/nsqio/nsq/internal/quantile")type TopicStats struct { TopicName string `json:"topic_name"` Channels []ChannelStats `... 阅读全文
posted @ 2017-08-31 11:19 张伯雨 阅读(265) 评论(0) 推荐(0)
rename.go
摘要:package nsqdimport ( "syscall" "unsafe")var ( modkernel32 = syscall.NewLazyDLL("kernel32.dll") procMoveFileExW = modkernel32.NewProc("MoveFileExW"))const ( MOVEFILE_REPLACE_EXISTING... 阅读全文
posted @ 2017-08-31 11:18 张伯雨 阅读(213) 评论(0) 推荐(0)
rename_windows.go
摘要:package nsqdimport ( "syscall" "unsafe")var ( modkernel32 = syscall.NewLazyDLL("kernel32.dll") procMoveFileExW = modkernel32.NewProc("MoveFileExW"))const ( MOVEFILE_REPLACE_EXISTING... 阅读全文
posted @ 2017-08-31 11:18 张伯雨 阅读(443) 评论(0) 推荐(0)
protocol_v2.go
摘要:package nsqdimport ( "bytes" "encoding/binary" "encoding/json" "errors" "fmt" "io" "math" "math/rand" "net" "sync/atomic" "time" "unsafe" "github.com/nsqio/nsq/i... 阅读全文
posted @ 2017-08-31 11:17 张伯雨 阅读(389) 评论(0) 推荐(0)
 

1 2 3 4 下一页