Documentation ¶
Overview ¶
Package plugin contains a keyval plugin skeleton used in various key-value data store clients (e.g. etcdv3/plugin_impl_etcdv3.go, redis/plugin_impl_redis.go).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface { keyval.CoreBrokerWatcher }
Connection defines an access to a particular key-value data store implementation.
type Skeleton ¶
type Skeleton struct {
// contains filtered or unexported fields
}
Skeleton of a KV plugin is a generic part of KV plugin.
func NewSkeleton ¶
func NewSkeleton(name string, serviceLabel servicelabel.ReaderAPI, connection Connection) *Skeleton
NewSkeleton creates a new instance of the Skeleton with the given connector. The connection is established in AfterInit phase.
func (*Skeleton) AfterInit ¶
AfterInit is called once all plugin have been initialized. The connection to datastore is established in this phase.
func (*Skeleton) NewBroker ¶
func (plugin *Skeleton) NewBroker(keyPrefix string) keyval.ProtoBroker
NewBroker creates new instance of prefixed broker that provides API with arguments of type proto.Message
func (*Skeleton) NewWatcher ¶
func (plugin *Skeleton) NewWatcher(keyPrefix string) keyval.ProtoWatcher
NewWatcher creates new instance of prefixed broker that provides API with arguments of type proto.Message