Documentation ¶
Index ¶
- Variables
- func DataSrcContext(ctx context.Context, dataSrc string) context.Context
- func DataSrcFromContext(ctx context.Context) (dataSrc string, ok bool)
- type Deps
- type Dispatcher
- type KVPairs
- type KVStore
- type KeyVal
- type Option
- type Plugin
- func (p *Plugin) AfterInit() (err error)
- func (p Plugin) GetStatus(key string) (*Status, error)
- func (p *Plugin) Init() (err error)
- func (p *Plugin) InitialSync()
- func (p Plugin) ListData() KVPairs
- func (p Plugin) ListState() (KVPairs, error)
- func (p Plugin) PushData(ctx context.Context, kvPairs []KeyVal) (results []Result, err error)
- type Result
- type Status
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultPlugin = *NewPlugin()
DefaultPlugin is default instance of Plugin
View Source
var ( // EnableStatusPublishing enables status publishing. EnableStatusPublishing = os.Getenv("ENABLE_STATUS_PUBLISHING") != "" )
Functions ¶
Types ¶
type Deps ¶
type Deps struct { infra.PluginDeps GRPC grpc.Server KVScheduler kvs.KVScheduler Watcher datasync.KeyValProtoWatcher StatusPublisher datasync.KeyProtoValWriter }
Deps represents dependencies for the plugin.
type Dispatcher ¶
type KVStore ¶
type KVStore interface { ListAll() KVPairs List(dataSrc string) KVPairs Update(dataSrc, key string, val proto.Message) Delete(dataSrc, key string) Reset(dataSrc string) }
KVStore describes an interface for key-value store used by dispatcher.
type Option ¶
type Option func(*Plugin)
Option is a function that acts on a Plugin to inject Dependencies or configuration
type Plugin ¶
type Plugin struct { Deps // contains filtered or unexported fields }
Plugin implements sync service for GRPC.
func (*Plugin) InitialSync ¶
func (p *Plugin) InitialSync()
InitialSync will start initial synchronization with downstream.
type Status ¶
type Status = kvs.ValueStatus
Source Files ¶
Click to show internal directories.
Click to hide internal directories.