etcd

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientV3

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

func NewClientV3

func NewClientV3(ctx context.Context, logger *zap.Logger, c *Clientv3Config) *ClientV3

func (*ClientV3) Deregister

func (c *ClientV3) Deregister(name string) error

func (*ClientV3) GetEntries

func (c *ClientV3) GetEntries() ([]string, error)

GetEntries implements the etcd Client interface.

func (*ClientV3) Key

func (c *ClientV3) Key(name string) string

func (*ClientV3) LeaseID added in v1.0.1

func (c *ClientV3) LeaseID() int64

func (*ClientV3) Register

func (c *ClientV3) Register(name, value string) error

func (*ClientV3) ServicePrefix

func (c *ClientV3) ServicePrefix() string

func (*ClientV3) Update

func (c *ClientV3) Update(name, value string) error

func (*ClientV3) Watch

func (c *ClientV3) Watch(ch chan struct{})

WatchPrefix implements the etcd Client interface.

type Clientv3Config

type Clientv3Config struct {
	Endpoints              []string `yaml:"endpoints" json:"endpoints" usage:"Endpoints is a list of URLs."`
	AutoSyncIntervalMs     int      `` /* 195-byte string literal not displayed */
	DialTimeoutMs          int      `yaml:"dial-timeout-ms" json:"dialTimeoutMs" usage:"DialTimeout is the timeout for failing to establish a connection."`
	DialKeepAliveTimeMs    int      `` /* 161-byte string literal not displayed */
	DialKeepAliveTimeoutMs int      `` /* 239-byte string literal not displayed */
	MaxCallSendMsgSize     int      `` /* 177-byte string literal not displayed */
	MaxCallRecvMsgSize     int      `` /* 222-byte string literal not displayed */
	Username               string   `yaml:"username" json:"username" usage:"Username is a user name for authentication."`
	Password               string   `yaml:"password" json:"password" usage:"Password is a password for authentication."`
	Cert                   string   `yaml:"cert" json:"cert" usage:"Cert"`
	Key                    string   `yaml:"key" json:"key" usage:"Key"`
	CACert                 string   `yaml:"ca-cert" json:"caCert" usage:"CACert"`
	ServicePrefix          string   `yaml:"service-prefix" json:"servicePrefix" usage:"Service prefix"`
}

func NewClientv3Config

func NewClientv3Config() *Clientv3Config

func (*Clientv3Config) Check

func (c *Clientv3Config) Check(logger *zap.Logger)

Jump to

Keyboard shortcuts

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