Versions in this module Expand all Collapse all v1 v1.0.0 Aug 7, 2020 Changes in this version + var SendFileServiceName = "_filetransfer" + func GetFunctionName(i interface{}) string + func InfluxDB(r metrics.Registry, d time.Duration, url, database, username, password string) + func InfluxDBWithTags(r metrics.Registry, d time.Duration, url, database, username, password string, ...) + func RegisterFileTransfer(s *server.Server, fileTransfer *FileTransfer) + type AliasPlugin struct + Aliases map[string]*aliasPair + ReseverseAliases map[string]*aliasPair + func NewAliasPlugin() *AliasPlugin + func (p *AliasPlugin) Alias(aliasServicePath, aliasServiceMethod string, servicePath, serviceMethod string) + func (p *AliasPlugin) PostReadRequest(ctx context.Context, r *protocol.Message, e error) error + func (p *AliasPlugin) PreWriteResponse(ctx context.Context, r *protocol.Message, res *protocol.Message) error + type DownloadFileArgs struct + FileName string + type DownloadFileHandler func(conn net.Conn, args *DownloadFileArgs) + type FileTransfer struct + Addr string + func NewFileTransfer(addr string, handler FileTransferHandler, ...) *FileTransfer + func (s *FileTransfer) Start() error + func (s *FileTransfer) Stop() error + type FileTransferArgs struct + FileName string + FileSize int64 + Meta map[string]string + type FileTransferHandler func(conn net.Conn, args *FileTransferArgs) + type FileTransferReply struct + Addr string + Token []byte + type FileTransferService struct + FileTransfer *FileTransfer + func (s *FileTransferService) DownloadFile(ctx context.Context, args *DownloadFileArgs, reply *FileTransferReply) error + func (s *FileTransferService) TransferFile(ctx context.Context, args *FileTransferArgs, reply *FileTransferReply) error + type MDNSRegisterPlugin struct + Metrics metrics.Registry + ServiceAddress string + Services []*serviceMeta + UpdateInterval time.Duration + func NewMDNSRegisterPlugin(serviceAddress string, port int, m metrics.Registry, ...) *MDNSRegisterPlugin + func (p *MDNSRegisterPlugin) HandleConnAccept(conn net.Conn) (net.Conn, bool) + func (p *MDNSRegisterPlugin) Register(name string, rcvr interface{}, metadata string) (err error) + func (p *MDNSRegisterPlugin) Start() error + func (p *MDNSRegisterPlugin) Stop() error + func (p *MDNSRegisterPlugin) Unregister(name string) (err error) + type MetricsPlugin struct + Prefix string + Registry metrics.Registry + func NewMetricsPlugin(registry metrics.Registry) *MetricsPlugin + func (p *MetricsPlugin) Exp() + func (p *MetricsPlugin) Graphite(freq time.Duration, prefix string, addr *net.TCPAddr) + func (p *MetricsPlugin) HandleConnAccept(conn net.Conn) (net.Conn, bool) + func (p *MetricsPlugin) InfluxDB(freq time.Duration, url, database, username, password string) + func (p *MetricsPlugin) InfluxDBWithTags(freq time.Duration, url, database, username, password string, ...) + func (p *MetricsPlugin) Log(freq time.Duration, l metrics.Logger) + func (p *MetricsPlugin) PostReadRequest(ctx context.Context, r *protocol.Message, e error) error + func (p *MetricsPlugin) PostWriteResponse(ctx context.Context, req *protocol.Message, res *protocol.Message, e error) error + func (p *MetricsPlugin) PreReadRequest(ctx context.Context) error + func (p *MetricsPlugin) Register(name string, rcvr interface{}, metadata string) error + type OpenCensusPlugin struct + func (p OpenCensusPlugin) PostConnAccept(conn net.Conn) (net.Conn, bool) + func (p OpenCensusPlugin) PostWriteResponse(ctx context.Context, req *protocol.Message, res *protocol.Message, err error) error + func (p OpenCensusPlugin) PreHandleRequest(ctx context.Context, r *protocol.Message) error + func (p OpenCensusPlugin) Register(name string, rcvr interface{}, metadata string) error + func (p OpenCensusPlugin) RegisterFunction(name string, fn interface{}, metadata string) error + type OpenTracingPlugin struct + func (p OpenTracingPlugin) PostConnAccept(conn net.Conn) (net.Conn, bool) + func (p OpenTracingPlugin) PostWriteResponse(ctx context.Context, req *protocol.Message, res *protocol.Message, err error) error + func (p OpenTracingPlugin) PreHandleRequest(ctx context.Context, r *protocol.Message) error + func (p OpenTracingPlugin) Register(name string, rcvr interface{}, metadata string) error + func (p OpenTracingPlugin) RegisterFunction(name string, fn interface{}, metadata string) error + type RateLimitingPlugin struct + Capacity int64 + FillInterval time.Duration + func NewRateLimitingPlugin(fillInterval time.Duration, capacity int64) *RateLimitingPlugin + func (plugin *RateLimitingPlugin) HandleConnAccept(conn net.Conn) (net.Conn, bool) + type TracePlugin struct + func (p *TracePlugin) PostConnAccept(conn net.Conn) (net.Conn, bool) + func (p *TracePlugin) PostReadRequest(ctx context.Context, r *protocol.Message, e error) error + func (p *TracePlugin) PostWriteResponse(ctx context.Context, req *protocol.Message, res *protocol.Message, err error) error + func (p *TracePlugin) Register(name string, rcvr interface{}, metadata string) error + func (p *TracePlugin) RegisterFunction(name string, fn interface{}, metadata string) error