Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BackendPlugin ¶
type BackendPlugin interface { Plugin // Start should do final setup that requires a tear down e.g. setting // up connections and creating files. After Start is called the plugin // should be ready to receive messages. Start(cfg *cli.Context) error // Stop is the tear down counter part to Start. Stop should revert // states created by Start e.g. close connections or file descriptors. Stop() error Set(t string, r interface{}) error // Get retrieves one resource object. The metadata `m` will use // non-zero fields as a filter. The result is loaded into the object // passed through `retR`. Get(t string, m interface{}, retR interface{}) error // List returns the metadata of resources that matches non-zero fields // in the metadata `m`. `retM` gets assigned with the result. `retM` is // a slice of the resource type. List(t string, m interface{}, retM interface{}) error // Delete will remove the first resource object that matches non-zero // fields from `m`. Delete(t string, m interface{}, retR interface{}) error }
type Cfg ¶
type Cfg struct { Name string Cli []cli.Flag Interceptor grpc.UnaryServerInterceptor }
type EventCBDelete ¶
type EventCBDelete func(t string, m interface{})
type EventCBGet ¶
type EventCBGet func(t string, m interface{})
type EventCBList ¶
type EventCBList func(t string, m interface{})
type EventCBSet ¶
type EventCBSet func(t string, r interface{})
type EventPlugin ¶
type EventPlugin interface { Plugin RegisterCB() (EventCBSet, EventCBGet, EventCBList, EventCBDelete) }
type InterceptorPlugin ¶
type Plugin ¶
type Plugin interface { // Register is a preparation stage e.g. allocating resources and // preprocessing. Should not start connections or alike that requires // some kind if tear down this should be handled in Start. Register() (Cfg, error) // Cfg returns the plugin configuration. No work should be done in Cfg. Cfg() Cfg }
Click to show internal directories.
Click to hide internal directories.