etcdclient

package
v0.0.0-...-9eeb0f4 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServcieTimeout = 50 * time.Second
	BasePath       = "/assigner"
	AppsPath       = BasePath + "/apps/"
	IpsPath        = BasePath + "/ips/"
	IdsPath        = BasePath + "/ids/"
	QueryCoresPath = "/registry/pods/default/"
	ConfigPath     = BasePath + "/config"
)

Functions

This section is empty.

Types

type App

type App struct {
	App       string `App`
	Component string `Component`
	Ips       []Ip   `Ips`
}

type Etcd

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

func NewEtcdClient

func NewEtcdClient(etcdpath string) (*Etcd, error)

func (*Etcd) CreateAbsoluteDir

func (e *Etcd) CreateAbsoluteDir(absoluteDir string) error

func (*Etcd) CreateAbsoluteKey

func (e *Etcd) CreateAbsoluteKey(absoluteKey, value string) (string, error)

func (*Etcd) CreateKey

func (e *Etcd) CreateKey(key, value string) (string, error)

func (*Etcd) DeleteAbsoluteKey

func (e *Etcd) DeleteAbsoluteKey(absoluteKey string) (string, error)

func (*Etcd) DeleteKey

func (e *Etcd) DeleteKey(key string) (string, error)

func (*Etcd) GetAbsoluteDir

func (e *Etcd) GetAbsoluteDir(absoluteDir string) (*client.Response, error)

func (*Etcd) GetAbsoluteDirIps

func (e *Etcd) GetAbsoluteDirIps(absoluteDir string) ([]Ip, error)

func (*Etcd) GetAbsoluteKey

func (e *Etcd) GetAbsoluteKey(absoluteKey string) (string, error)

func (*Etcd) GetKey

func (e *Etcd) GetKey(key string) (string, error)

func (*Etcd) QueryContainerCores

func (e *Etcd) QueryContainerCores(podname string) (int, error)

func (*Etcd) QueryContainerid

func (e *Etcd) QueryContainerid(containerid string) (string, error)

type Ip

type Ip struct {
	Ip      string `Ip`
	Gateway string `Gateway`
}

Jump to

Keyboard shortcuts

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