Documentation ¶
Index ¶
- Constants
- func EtcdHealthCheck(data []byte) error
- func GetEtcdVersion(host string) (string, error)
- func IsEtcdNodeExist(err error) bool
- func IsEtcdNotFound(err error) bool
- func IsEtcdTestFailed(err error) bool
- func IsEtcdUnreachable(err error) bool
- func IsEtcdWatchExpired(err error) bool
- func IsEtcdWatchStoppedByUser(err error) bool
- func NewEtcdClientStartServerIfNecessary(server string) (tools.EtcdClient, error)
- func NewEtcdStorage(client tools.EtcdClient, codec runtime.Codec, prefix string) storage.Interface
- type APIObjectVersioner
- type TransformFunc
Constants ¶
const ( EtcdCreate = "create" EtcdGet = "get" EtcdSet = "set" EtcdCAS = "compareAndSwap" EtcdDelete = "delete" EtcdExpire = "expire" )
Etcd watch event actions
Variables ¶
This section is empty.
Functions ¶
func EtcdHealthCheck ¶
func GetEtcdVersion ¶
GetEtcdVersion performs a version check against the provided Etcd server, returning the string response, and error (if any).
func IsEtcdNodeExist ¶
IsEtcdNodeExist returns true if and only if err is an etcd node already exist error.
func IsEtcdNotFound ¶
IsEtcdNotFound returns true if and only if err is an etcd not found error.
func IsEtcdTestFailed ¶
IsEtcdTestFailed returns true if and only if err is an etcd write conflict.
func IsEtcdUnreachable ¶
IsEtcdUnreachable returns true if and only if err indicates the server could not be reached.
func IsEtcdWatchExpired ¶
IsEtcdWatchExpired returns true if and only if err indicates the watch has expired.
func IsEtcdWatchStoppedByUser ¶
IsEtcdWatchStoppedByUser returns true if and only if err is a client triggered stop.
func NewEtcdClientStartServerIfNecessary ¶
func NewEtcdClientStartServerIfNecessary(server string) (tools.EtcdClient, error)
func NewEtcdStorage ¶
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