Documentation ¶
Index ¶
- Variables
- 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) Close()
- func (s *ZkClient) CloseConn(conn *grpc.ClientConn)
- 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.ClientConn
- func (s *ZkClient) GetConfFromRegistry(key string) ([]byte, error)
- func (s *ZkClient) GetConn(ctx context.Context, serviceName string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func (s *ZkClient) GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]*grpc.ClientConn, 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) GetSelfConnTarget() string
- func (s *ZkClient) GetUserIdHashGatewayHost(ctx context.Context, userId string) (string, error)
- func (s *ZkClient) GetZkConn() *zk.Conn
- func (s *ZkClient) Printf(format string, a ...any)
- 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.ClientConn)
func (*ZkClient) CreateRpcRootNodes ¶
func (*ZkClient) CreateTempNode ¶
func (*ZkClient) GetClientLocalConns ¶
func (s *ZkClient) GetClientLocalConns() map[string][]*grpc.ClientConn
func (*ZkClient) GetConfFromRegistry ¶
func (*ZkClient) GetConn ¶
func (s *ZkClient) GetConn(ctx context.Context, serviceName string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
func (*ZkClient) GetConns ¶
func (s *ZkClient) GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]*grpc.ClientConn, error)
func (*ZkClient) GetConnsRemote ¶
func (*ZkClient) GetRootPath ¶
func (*ZkClient) GetSelfConnTarget ¶ added in v0.0.14
func (*ZkClient) GetUserIdHashGatewayHost ¶ added in v0.0.21
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.