etcd

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CommonPrefix is the common prefix for all keys.
	CommonPrefix = "/gpu-docker-api/apis/v1"
)

Variables

This section is empty.

Functions

func CloseEtcdClient

func CloseEtcdClient() error

func Del

func Del(resource Resource, key string) error

func GetValue added in v0.0.3

func GetValue(resource Resource, key string) ([]byte, error)

func InitEtcdClient

func InitEtcdClient(addr string) error

func Put

func Put(resource Resource, key string, value *string) error

func ResourcePrefix added in v0.0.3

func ResourcePrefix(prefix Resource, name string) string

Types

type DelKey

type DelKey struct {
	Resource Resource
	Key      string
}

type PutKeyValue

type PutKeyValue struct {
	Key      string
	Value    *string
	Resource Resource
}

type ReplicaSet added in v0.0.3

type ReplicaSet = []*combine

func GetRevisionRange added in v0.0.3

func GetRevisionRange(resource Resource, key string) (ReplicaSet, error)

type Resource added in v0.0.3

type Resource = string
const (
	Containers Resource = "containers"
	Volumes    Resource = "volumes"
	Versions   Resource = "versions"
	Merges     Resource = "merges"
	Gpus       Resource = "gpus"
	Ports      Resource = "ports"
)

type Value added in v0.0.3

type Value = []byte

func GetRevision added in v0.0.3

func GetRevision(resource Resource, key string, version int64) (Value, error)

Jump to

Keyboard shortcuts

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