golug_etcdv3

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Timeout = time.Second * 2

Variables

View Source
var Name = "etcdv3"

Functions

func GetCfg

func GetCfg() map[string]Cfg

func GetClient

func GetClient(names ...string) *clientv3.Client

Types

type Cfg

type Cfg struct {
	Endpoints            []string      `json:"endpoints" yaml:"endpoints"`
	AutoSyncInterval     time.Duration `json:"auto_sync_interval" yaml:"auto_sync_interval"`
	DialTimeout          time.Duration `json:"dial_timeout" yaml:"dial_timeout"`
	DialKeepAliveTime    time.Duration `json:"dial_keep_alive_time" yaml:"dial_keep_alive_time"`
	DialKeepAliveTimeout time.Duration `json:"dial_keep_alive_timeout" yaml:"dial_keep_alive_timeout"`
	Username             string        `json:"username" yaml:"username"`
	Password             string        `json:"password" yaml:"password"`
	RejectOldCluster     bool          `json:"reject_old_cluster" yaml:"reject_old_cluster"`
	PermitWithoutStream  bool          `json:"permit_without_stream" yaml:"permit_without_stream"`
}

func GetDefaultCfg

func GetDefaultCfg() Cfg

Jump to

Keyboard shortcuts

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