Documentation ¶
Index ¶
Constants ¶
View Source
const ( FileWatcherPrefix = "receptor-watcher-" FileReactorPrefix = "receptor-reactor-" )
Plugin filename patterns
Variables ¶
This section is empty.
Functions ¶
func ServeReactor ¶
func ServeWatcher ¶
ServeWatcher exports the watcher as a plugin
Types ¶
type Lookup ¶
type Lookup struct {
// contains filtered or unexported fields
}
Lookup looks up plugins and manages the setup and teardown phase.
func (*Lookup) Cleanup ¶
Cleanup kills all plugin processes and removes sockets. Each cleanup step times out in parallel, which results in a potentional higher timeout for the whole cleanup. Blocks until completed.
type LookupService ¶
type LookupService interface { Watcher(name string) (pipe.Watcher, error) Reactor(name string) (pipe.Reactor, error) Cleanup(timeout time.Duration) }
LookupService looks up watchers and reactors.
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
Process manages the start and shutdown of a plugin process
type RPCReactor ¶
type RPCReactor struct {
// contains filtered or unexported fields
}
RPCReactor defines a remotely executed reactor
func NewRPCReactor ¶
func NewRPCReactor(socket string) (*RPCReactor, error)
func (*RPCReactor) Accept ¶
func (r *RPCReactor) Accept(cfg json.RawMessage) (pipe.Endpoint, error)
Handle job and return a handler to start
func (*RPCReactor) Setup ¶
func (r *RPCReactor) Setup(cfg json.RawMessage) error
type RPCReactorEndpoint ¶
type RPCReactorEndpoint struct {
// contains filtered or unexported fields
}
func (*RPCReactorEndpoint) Handle ¶
func (e *RPCReactorEndpoint) Handle(eventCh chan pipe.Event, closeCh chan struct{})
type RPCWatcher ¶
type RPCWatcher struct {
// contains filtered or unexported fields
}
RPCWatcher defines a remotely executed watcher
func NewRPCWatcher ¶
func NewRPCWatcher(socket string) (*RPCWatcher, error)
func (*RPCWatcher) Accept ¶
func (w *RPCWatcher) Accept(cfg json.RawMessage) (pipe.Endpoint, error)
Handle job and return a handler to start watching
func (*RPCWatcher) Setup ¶
func (w *RPCWatcher) Setup(cfg json.RawMessage) error
type RPCWatcherEndpoint ¶
type RPCWatcherEndpoint struct {
// contains filtered or unexported fields
}
func (*RPCWatcherEndpoint) Handle ¶
func (e *RPCWatcherEndpoint) Handle(eventCh chan pipe.Event, closeCh chan struct{})
Click to show internal directories.
Click to hide internal directories.