etcd

package
Version: v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2016 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EtcdCreate = "create"
	EtcdGet    = "get"
	EtcdSet    = "set"
	EtcdCAS    = "compareAndSwap"
	EtcdDelete = "delete"
	EtcdExpire = "expire"
)

Etcd watch event actions

Variables

This section is empty.

Functions

func NewEtcdStorage

func NewEtcdStorage(client etcd.Client, codec runtime.Codec, prefix string, quorum bool) storage.Interface

Creates a new storage interface from the client TODO: deprecate in favor of storage.Config abstraction over time

Types

type APIObjectVersioner

type APIObjectVersioner struct{}

APIObjectVersioner implements versioning and extracting etcd node information for objects that have an embedded ObjectMeta or ListMeta field.

func (APIObjectVersioner) ObjectResourceVersion

func (a APIObjectVersioner) ObjectResourceVersion(obj runtime.Object) (uint64, error)

ObjectResourceVersion implements Versioner

func (APIObjectVersioner) UpdateList

func (a APIObjectVersioner) UpdateList(obj runtime.Object, resourceVersion uint64) error

UpdateList implements Versioner

func (APIObjectVersioner) UpdateObject

func (a APIObjectVersioner) UpdateObject(obj runtime.Object, expiration *time.Time, resourceVersion uint64) error

UpdateObject implements Versioner

type EtcdConfig added in v1.2.0

type EtcdConfig struct {
	Prefix     string
	ServerList []string
	KeyFile    string
	CertFile   string
	CAFile     string
	Quorum     bool
}

Configuration object for constructing etcd.Config

type EtcdStorageConfig added in v1.2.0

type EtcdStorageConfig struct {
	Config EtcdConfig
	Codec  runtime.Codec
}

storage.Config object for etcd.

func (*EtcdStorageConfig) GetType added in v1.2.0

func (c *EtcdStorageConfig) GetType() string

implements storage.Config

func (*EtcdStorageConfig) NewStorage added in v1.2.0

func (c *EtcdStorageConfig) NewStorage() (storage.Interface, error)

implements storage.Config

type HighWaterMark added in v1.2.0

type HighWaterMark int64

HighWaterMark is a thread-safe object for tracking the maximum value seen for some quantity.

func (*HighWaterMark) Update added in v1.2.0

func (hwm *HighWaterMark) Update(current int64) bool

Update returns true if and only if 'current' is the highest value ever seen.

type TransformFunc

type TransformFunc func(runtime.Object) (runtime.Object, error)

TransformFunc attempts to convert an object to another object for use with a watcher.

Directories

Path Synopsis
Package util holds generic etcd-related utility functions that any user of ectd might want to use, without pulling in kubernetes-specific code.
Package util holds generic etcd-related utility functions that any user of ectd might want to use, without pulling in kubernetes-specific code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL