compat

package
v3.4.0-0.dev+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToTagsLabelsRules

func ToTagsLabelsRules(d *model.KVPair) (t, l, r *model.KVPair)

ToTagsLabelsRules converts a Profile KVPair to separate KVPair types for Keys, Labels and Rules. These separate KVPairs are used to write three separate objects that make up a single profile.

Types

type ModelAdaptor

type ModelAdaptor struct {
	// contains filtered or unexported fields
}

func NewAdaptor

func NewAdaptor(c *etcdv2.EtcdClient) *ModelAdaptor

func (*ModelAdaptor) Apply

func (c *ModelAdaptor) Apply(d *model.KVPair) (*model.KVPair, error)

Apply - this just calls through to the datastore driver (the upgrade code only needs Apply to set the Ready flag, so we don't need any of the complicated conversion code here).

func (*ModelAdaptor) Get

func (c *ModelAdaptor) Get(k model.Key) (*model.KVPair, error)

Get an entry from the datastore. This errors if the entry does not exist.

func (*ModelAdaptor) IsKDD

func (c *ModelAdaptor) IsKDD() bool

IsKDD() returns true if this backend is KDD. Since the compat module is only used for etcdv2, this returns false.

func (*ModelAdaptor) List

func (c *ModelAdaptor) List(l model.ListInterface) ([]*model.KVPair, error)

List entries in the datastore. This may return an empty list of there are no entries matching the request in the ListInterface.

func (*ModelAdaptor) Update

func (c *ModelAdaptor) Update(d *model.KVPair) (*model.KVPair, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL