internal

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger()

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

type ClientOptions

type ClientOptions struct {
	Timeout     time.Duration
	DialOptions []grpc.DialOption
}

type DirectClient

type DirectClient struct {
	// contains filtered or unexported fields
}

func NewDirectClient

func NewDirectClient(server string, opts ...ClientOption) (*DirectClient, error)

func (*DirectClient) Conn

func (c *DirectClient) Conn() *grpc.ClientConn

type DiscovClient

type DiscovClient struct {
	// contains filtered or unexported fields
}

func NewDiscovClient

func NewDiscovClient(endpoints []string, key string, opts ...ClientOption) (*DiscovClient, error)

func (*DiscovClient) Conn

func (c *DiscovClient) Conn() *grpc.ClientConn

type Logger

type Logger struct{}

func (*Logger) Error

func (l *Logger) Error(args ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(format string, args ...interface{})

func (*Logger) Errorln

func (l *Logger) Errorln(args ...interface{})

func (*Logger) Fatal

func (l *Logger) Fatal(args ...interface{})

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, args ...interface{})

func (*Logger) Fatalln

func (l *Logger) Fatalln(args ...interface{})

func (*Logger) Info

func (l *Logger) Info(args ...interface{})

func (*Logger) Infof

func (l *Logger) Infof(format string, args ...interface{})

func (*Logger) Infoln

func (l *Logger) Infoln(args ...interface{})

func (*Logger) V

func (l *Logger) V(v int) bool

func (*Logger) Warning

func (l *Logger) Warning(args ...interface{})

func (*Logger) Warningf

func (l *Logger) Warningf(format string, args ...interface{})

func (*Logger) Warningln

func (l *Logger) Warningln(args ...interface{})

type RegisterFn

type RegisterFn func(*grpc.Server)

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

Directories

Path Synopsis
balancer
p2c

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL