Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FBPlugin ¶
type FBPlugin struct {
// contains filtered or unexported fields
}
FBPlugin is a plugin which communicates using FlatBuffer messages.
func NewFBPlugin ¶
NewFBPlugin creates a new plugin instance. In order to start the plugin, call the Start() function.
type Middleware ¶ added in v0.4.0
type Middleware struct {
// contains filtered or unexported fields
}
func NewMiddleware ¶
func NewMiddleware(plugin Plugin, chErr chan error) (*Middleware, error)
func (*Middleware) Errors ¶ added in v0.4.0
func (mw *Middleware) Errors() <-chan error
func (*Middleware) Middleware ¶ added in v0.4.0
func (mw *Middleware) Middleware() func(http.Handler) http.Handler
func (*Middleware) Stop ¶ added in v0.4.0
func (mw *Middleware) Stop()
type Plugin ¶
type Plugin interface {
// Name returns a name identifying the plugin.
Name() string
// Start starts the plugin but does not wait for it to complete.
//
// It returns a channel which must be used to deliver messages to the plugin.
// This channel must be closed when there are no more messages to be delivered.
//
// After a successful call to Start the Stop method must be called in
// order to release associated system resources.
Start(chan error) (chan Message, error)
// Stop stops the plugin and release system resources.
Stop() error
}
Click to show internal directories.
Click to hide internal directories.