Documentation ¶
Index ¶
- Variables
- func GetValue(filename string, key string, version int64) ([]byte, error)
- func ListVersions(filename string, key string) ([]int64, error)
- type Checksum
- type ConstraintOp
- type FieldConstraint
- type FieldFilter
- type Filter
- type KeySummary
- type KeySummaryProjection
- type KeySummaryStats
- type PrefixFilter
Constants ¶
This section is empty.
Variables ¶
var ProjectEverything = &KeySummaryProjection{HasKey: true, HasValue: true}
Functions ¶
Types ¶
type Checksum ¶
func HashByRevision ¶
HashByRevision returns the checksum and revision. The checksum is of the live keyspace at a particular revision. It is equivalent to performing a range request of all key-value pairs can computing a hash of the data. If revision is 0, the latest revision is checksumed, else revision is checksumed. The resulting hash is consistent particular revision in the presence of compactions; so long as the revions itself has not been compacted, the hash never changes.
type ConstraintOp ¶
type ConstraintOp int
const (
Equals ConstraintOp = iota
)
func (ConstraintOp) String ¶
func (co ConstraintOp) String() string
type FieldConstraint ¶
type FieldConstraint struct {
// contains filtered or unexported fields
}
func (*FieldConstraint) BuildFilter ¶
func (fc *FieldConstraint) BuildFilter() (*FieldFilter, error)
func (*FieldConstraint) String ¶
func (fc *FieldConstraint) String() string
type FieldFilter ¶
type FieldFilter struct { *FieldConstraint // contains filtered or unexported fields }
FieldFilter filters according to a field constraint.
func (*FieldFilter) Accept ¶
func (ff *FieldFilter) Accept(ks *KeySummary) (bool, error)
type Filter ¶
type Filter interface {
Accept(ks *KeySummary) (bool, error)
}
Filter declares an interface for filtering KeySummary results.
func ParseFilters ¶
ParseFilters parses a comma separated list of '<field>=<value>' filters where each field is specified in golang template format, e.g. '.Value.metadata.namespace'.
type KeySummary ¶
type KeySummary struct { Key string Version int64 Value interface{} TypeMeta *runtime.TypeMeta Stats *KeySummaryStats }
KeySummary represents a kubernetes object stored in etcd.
func ListKeySummaries ¶
func ListKeySummaries(filename string, filters []Filter, proj *KeySummaryProjection, revision int64) ([]*KeySummary, error)
ListKeySummaries returns a result set with all the provided filters and projections applied.
func (*KeySummary) ValueJson ¶
func (ks *KeySummary) ValueJson() string
ValueJson gets the json representation of a kubernetes object stored in etcd.
type KeySummaryProjection ¶
KeySummaryProjection declares which optional fields to include in KeySummary results.
type KeySummaryStats ¶
type KeySummaryStats struct { VersionCount int KeySize int ValueSize int AllVersionsKeySize int AllVersionsValueSize int }
KeySummaryStats provides high level statistics on a a particular kubernetes object stored in etcd.
type PrefixFilter ¶
type PrefixFilter struct {
// contains filtered or unexported fields
}
PrefixFilter filter by key prefix.
func NewPrefixFilter ¶
func NewPrefixFilter(prefix string) *PrefixFilter
func (*PrefixFilter) Accept ¶
func (ff *PrefixFilter) Accept(ks *KeySummary) (bool, error)