srv

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEtcdClient

func NewEtcdClient(etcdDsn string) (*clientv3.Client, error)

NewEtcdClient creates a new etcd client. etcdDsn: connect string like etcd://user:password@host:port?useTls=true&certFile=xxx&keyFile=xxx&caCertFile=xxx&timeout=xxx

Types

type Config

type Config interface {
	Set(key string, val interface{})
	Get(key string) (interface{}, error)
}

type EtcdConfig

type EtcdConfig struct {
	Host       string
	Username   string
	Password   string
	UseTls     bool
	CertFile   string
	KeyFile    string
	CaCertFile string
	Timeout    int
}

func ParseEtcdCfg

func ParseEtcdCfg(host string) (*EtcdConfig, error)

Jump to

Keyboard shortcuts

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