Documentation ¶
Index ¶
- func BuildDirectTarget(endpoints []string) string
- func BuildDiscovTarget(endpoints []string, key string) string
- func InitLogger()
- func NewClient(target string, opts ...ClientOption) (*client, error)
- func WithStreamClientInterceptors(interceptors ...grpc.StreamClientInterceptor) grpc.DialOption
- func WithStreamServerInterceptors(interceptors ...grpc.StreamServerInterceptor) grpc.ServerOption
- func WithUnaryClientInterceptors(interceptors ...grpc.UnaryClientInterceptor) grpc.DialOption
- func WithUnaryServerInterceptors(interceptors ...grpc.UnaryServerInterceptor) grpc.ServerOption
- type ClientOption
- type ClientOptions
- type Logger
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Errorln(args ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Fatalf(format string, args ...interface{})
- func (l *Logger) Fatalln(args ...interface{})
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) Infoln(args ...interface{})
- func (l *Logger) V(v int) bool
- func (l *Logger) Warning(args ...interface{})
- func (l *Logger) Warningf(format string, args ...interface{})
- func (l *Logger) Warningln(args ...interface{})
- type RegisterFn
- type Server
- type ServerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDirectTarget ¶
func BuildDiscovTarget ¶
func InitLogger ¶
func InitLogger()
func NewClient ¶
func NewClient(target string, opts ...ClientOption) (*client, error)
func WithStreamClientInterceptors ¶
func WithStreamClientInterceptors(interceptors ...grpc.StreamClientInterceptor) grpc.DialOption
func WithStreamServerInterceptors ¶
func WithStreamServerInterceptors(interceptors ...grpc.StreamServerInterceptor) grpc.ServerOption
func WithUnaryClientInterceptors ¶
func WithUnaryClientInterceptors(interceptors ...grpc.UnaryClientInterceptor) grpc.DialOption
func WithUnaryServerInterceptors ¶
func WithUnaryServerInterceptors(interceptors ...grpc.UnaryServerInterceptor) grpc.ServerOption
Types ¶
type ClientOption ¶
type ClientOption func(options *ClientOptions)
func WithDialOption ¶
func WithDialOption(opt grpc.DialOption) ClientOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientOption
func WithUnaryClientInterceptor ¶
func WithUnaryClientInterceptor(interceptor grpc.UnaryClientInterceptor) ClientOption
type ClientOptions ¶
type ClientOptions struct { Timeout time.Duration DialOptions []grpc.DialOption }
type RegisterFn ¶
type Server ¶
type Server interface { AddOptions(options ...grpc.ServerOption) AddStreamInterceptors(interceptors ...grpc.StreamServerInterceptor) AddUnaryInterceptors(interceptors ...grpc.UnaryServerInterceptor) SetName(string) Start(register RegisterFn) error }
func NewRpcPubServer ¶
func NewRpcPubServer(etcdEndpoints []string, etcdKey, listenOn string, opts ...ServerOption) (Server, error)
func NewRpcServer ¶
func NewRpcServer(address string, opts ...ServerOption) Server
type ServerOption ¶
type ServerOption func(options *rpcServerOptions)
func WithMetrics ¶
func WithMetrics(metrics *stat.Metrics) ServerOption
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
balancer
|
|
Package mock is a generated protocol buffer package.
|
Package mock is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.