forked from aporeto-inc/trireme-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
interfaces.go
28 lines (21 loc) · 870 Bytes
/
interfaces.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package monitorinstance
import (
"github.com/aporeto-inc/trireme-lib/internal/monitor/rpc/registerer"
"github.com/aporeto-inc/trireme-lib/rpc/processor"
)
// Implementation for a monitor.
type Implementation interface {
// Start starts the monitor implementation.
Start() error
// Stop Stops the monitor implementation.
Stop() error
// SetupConfig provides a configuration to implmentations. Every implmentation
// can have its own config type.
SetupConfig(registerer registerer.Registerer, cfg interface{}) error
// SetupHandlers sets up handlers for monitors to invoke for various events such as
// processing unit events and synchronization events. This will be called before Start()
// by the consumer of the monitor
SetupHandlers(c *processor.Config)
// ReSync should resynchronize PUs. This should be done while starting up.
ReSync() error
}