nodeconfig

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2018 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	Log                logging.Logger
	Publish            *kvdbsync.Plugin // KeyProtoValWriter does not define Delete
	ControllerInformer informers.NodeConfigInformer
}

Deps defines dependencies for NodeConfig CRD Handler.

type DsItems added in v1.4.0

type DsItems map[string]interface{}

DsItems defines the structure holding items listed from the data store.

type Handler

type Handler struct {
	Deps
	// contains filtered or unexported fields
}

Handler handler implements Handler interface,

func (*Handler) Init

func (h *Handler) Init() error

Init initializes handler configuration NodeConfig Handler will be taking action on resource CRUD

func (*Handler) ObjectCreated

func (h *Handler) ObjectCreated(obj interface{})

ObjectCreated is called when a CRD object is created

func (*Handler) ObjectDeleted

func (h *Handler) ObjectDeleted(obj interface{})

ObjectDeleted is called when a CRD object is deleted

func (*Handler) ObjectUpdated

func (h *Handler) ObjectUpdated(oldObj, newObj interface{})

ObjectUpdated is called when a CRD object is updated

type K8sToProtoConverter added in v1.4.0

type K8sToProtoConverter func(interface{}) (interface{}, string, bool)

K8sToProtoConverter defines the signature for a function converting k8s objects to node config protobuf objects.

type KeyProtoValBroker added in v1.4.0

type KeyProtoValBroker interface {
	// Put <data> to ETCD or to any other key-value based data source.
	Put(key string, data proto.Message, opts ...datasync.PutOption) error

	// Delete data under the <key> in ETCD or in any other key-value based data
	// source.
	Delete(key string, opts ...datasync.DelOption) (existed bool, err error)

	// GetValue reads a value from etcd stored under the given key.
	GetValue(key string, reqObj proto.Message) (found bool, revision int64, err error)

	// List values stored in etcd under the given prefix.
	ListValues(prefix string) (keyval.ProtoKeyValIterator, error)
}

KeyProtoValBroker defines handler's interface to the key-value data store. It defines a subset of operations from a generic cn-infra broker interface (keyval.ProtoBroker in cn-infra).

Directories

Path Synopsis
Package model is a generated protocol buffer package.
Package model is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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