internal

package
v1.1.3-0...-a28cbea Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDirectTarget

func BuildDirectTarget(endpoints []string) string

func BuildDiscovTarget

func BuildDiscovTarget(endpoints []string, key string) string

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 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
Package mock is a generated protocol buffer package.
Package mock is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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