Documentation ¶
Index ¶
- Constants
- Variables
- func NewEtcdStorage(client etcd.Client, codec runtime.Codec, prefix string, quorum bool, ...) storage.Interface
- type APIObjectVersioner
- func (a APIObjectVersioner) CompareResourceVersion(lhs, rhs runtime.Object) int
- func (a APIObjectVersioner) ObjectResourceVersion(obj runtime.Object) (uint64, error)
- func (a APIObjectVersioner) UpdateList(obj runtime.Object, resourceVersion uint64) error
- func (a APIObjectVersioner) UpdateObject(obj runtime.Object, resourceVersion uint64) error
- type HighWaterMark
- type TransformFunc
Constants ¶
View Source
const ( EtcdCreate = "create" EtcdGet = "get" EtcdSet = "set" EtcdCAS = "compareAndSwap" EtcdDelete = "delete" EtcdCAD = "compareAndDelete" EtcdExpire = "expire" )
Etcd watch event actions
Variables ¶
View Source
var Versioner storage.Versioner = APIObjectVersioner{}
APIObjectVersioner implements Versioner
Functions ¶
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) CompareResourceVersion ¶ added in v1.3.0
func (a APIObjectVersioner) CompareResourceVersion(lhs, rhs runtime.Object) int
CompareResourceVersion compares etcd resource versions. Outside this API they are all strings, but etcd resource versions are special, they're actually ints, so we can easily compare them.
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, resourceVersion uint64) error
UpdateObject implements Versioner
type HighWaterMark ¶ added in v1.2.3
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.3
func (hwm *HighWaterMark) Update(current int64) bool
Update returns true if and only if 'current' is the highest value ever seen.
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. |
Click to show internal directories.
Click to hide internal directories.