xjf_etcd

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdValue

type EtcdValue struct {
	Ip   string `json:"ip" bson:"ip"`
	Http string `json:"http" bson:"http"`
	Grpc string `json:"grpc" bson:"grpc"`
}

type XjfEtcd

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

func NewXjfEtcd

func NewXjfEtcd(endPoints []string) *XjfEtcd

func (*XjfEtcd) DiscoverServer

func (c *XjfEtcd) DiscoverServer(ctx context.Context, key string) error

func (*XjfEtcd) GrpcCall

func (c *XjfEtcd) GrpcCall(ctx context.Context, key string) (*grpc.ClientConn, error)

func (*XjfEtcd) HttpCall

func (c *XjfEtcd) HttpCall(ctx context.Context, key string) (*http.Client, error)

func (*XjfEtcd) RegisterKeepAlive

func (c *XjfEtcd) RegisterKeepAlive(ctx context.Context, key string, value string, id clientv3.LeaseID) error

func (*XjfEtcd) RegisterServer

func (c *XjfEtcd) RegisterServer(ctx context.Context, key string, value *EtcdValue) error

func (*XjfEtcd) WatchServer

func (c *XjfEtcd) WatchServer(ctx context.Context, key string)

Jump to

Keyboard shortcuts

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