Documentation ¶
Index ¶
- Variables
- type Logger
- type Resolver
- type ZkClient
- func (s *ZkClient) AddOption(opts ...grpc.DialOption)
- func (s *ZkClient) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error)
- func (s *ZkClient) CloseConn(conn grpc.ClientConnInterface)
- func (s *ZkClient) CloseZK()
- func (s *ZkClient) CreateRpcRootNodes(serviceNames []string) error
- func (s *ZkClient) CreateTempNode(rpcRegisterName, addr string) (node string, err error)
- func (s *ZkClient) GetClientLocalConns() map[string][]grpc.ClientConnInterface
- func (s *ZkClient) GetConfFromRegistry(key string) ([]byte, error)
- func (s *ZkClient) GetConn(ctx context.Context, serviceName string, opts ...grpc.DialOption) (grpc.ClientConnInterface, error)
- func (s *ZkClient) GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]grpc.ClientConnInterface, error)
- func (s *ZkClient) GetConnsRemote(serviceName string) (conns []resolver.Address, err error)
- func (s *ZkClient) GetNode() string
- func (s *ZkClient) GetRootPath() string
- func (s *ZkClient) GetZkConn() *zk.Conn
- func (s *ZkClient) Register(rpcRegisterName, host string, port int, opts ...grpc.DialOption) error
- func (s *ZkClient) RegisterConf2Registry(key string, conf []byte) error
- func (s *ZkClient) Scheme() string
- func (s *ZkClient) UnRegister() error
- type ZkOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrConnIsNil = errors.New("conn is nil") ErrConnIsNilButLocalNotNil = errors.New("conn is nil, but local is not nil") )
Functions ¶
This section is empty.
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func (*Resolver) ResolveNow ¶
func (r *Resolver) ResolveNow(o resolver.ResolveNowOptions)
func (*Resolver) ResolveNowZK ¶
func (r *Resolver) ResolveNowZK(o resolver.ResolveNowOptions)
type ZkClient ¶
type ZkClient struct {
// contains filtered or unexported fields
}
func (*ZkClient) AddOption ¶
func (s *ZkClient) AddOption(opts ...grpc.DialOption)
func (*ZkClient) Build ¶
func (s *ZkClient) Build( target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions, ) (resolver.Resolver, error)
func (*ZkClient) CloseConn ¶
func (s *ZkClient) CloseConn(conn grpc.ClientConnInterface)
func (*ZkClient) CreateRpcRootNodes ¶
func (*ZkClient) CreateTempNode ¶
func (*ZkClient) GetClientLocalConns ¶
func (s *ZkClient) GetClientLocalConns() map[string][]grpc.ClientConnInterface
func (*ZkClient) GetConfFromRegistry ¶
func (*ZkClient) GetConn ¶
func (s *ZkClient) GetConn(ctx context.Context, serviceName string, opts ...grpc.DialOption) (grpc.ClientConnInterface, error)
func (*ZkClient) GetConns ¶
func (s *ZkClient) GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]grpc.ClientConnInterface, error)
func (*ZkClient) GetConnsRemote ¶
func (*ZkClient) GetRootPath ¶
func (*ZkClient) RegisterConf2Registry ¶
func (*ZkClient) UnRegister ¶
type ZkOption ¶
type ZkOption func(*ZkClient)
func WithLogger ¶
func WithOptions ¶
func WithOptions(opts ...grpc.DialOption) ZkOption
func WithRoundRobin ¶
func WithRoundRobin() ZkOption
func WithTimeout ¶
func WithUserNameAndPassword ¶
Click to show internal directories.
Click to hide internal directories.