clientproxy

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ClientDefaultTimeout = 1

ClientDefaultTimeout ..

Variables

View Source
var ClientProxy clientProxy

ClientProxy ..

Functions

func Init

func Init()

Init ...

Types

type EtcdClient

type EtcdClient struct {
	UniqueZone *view.UniqZone
	// contains filtered or unexported fields
}

func NewEtcdClient

func NewEtcdClient(cfg clientv3.Config, options ...EtcdClientOption) (obj *EtcdClient, err error)

NewEtcdClient ..

func (*EtcdClient) Conn added in v0.4.0

func (e *EtcdClient) Conn() *clientv3.Client

func (*EtcdClient) Get

func (e *EtcdClient) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (resp *clientv3.GetResponse, err error)

func (*EtcdClient) Put

func (e *EtcdClient) Put(ctx context.Context, key, val string, opts ...clientv3.OpOption) (resp *clientv3.PutResponse, err error)

type EtcdClientOption added in v0.4.0

type EtcdClientOption func(e *EtcdClient)

func WithUniqueZone added in v0.4.0

func WithUniqueZone(zone *view.UniqZone) EtcdClientOption

Jump to

Keyboard shortcuts

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