etcd

package
v0.15.7 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Versioner implements Versioner

Functions

This section is empty.

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

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) ParseResourceVersion

func (a APIObjectVersioner) ParseResourceVersion(resourceVersion string) (uint64, error)

ParseResourceVersion takes a resource version argument and converts it to the etcd version. For watch we should pass to helper.Watch(). Because resourceVersion is an opaque value, the default watch behavior for non-zero watch is to watch the next value (if you pass "1", you will see updates from "2" onwards).

func (APIObjectVersioner) PrepareObjectForStorage

func (a APIObjectVersioner) PrepareObjectForStorage(obj runtime.Object) error

PrepareObjectForStorage clears resource version and self link prior to writing to etcd.

func (APIObjectVersioner) UpdateList

func (a APIObjectVersioner) UpdateList(obj runtime.Object, resourceVersion uint64, nextKey string, count *int64) error

UpdateList implements Versioner

func (APIObjectVersioner) UpdateObject

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

UpdateObject implements Versioner

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
y or Y : Canonical URL