/
interfaces.go
33 lines (24 loc) · 1.05 KB
/
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
29
30
31
32
33
package policyenforcer
import (
"github.com/aporeto-inc/trireme-lib/enforcer/utils/fqconfig"
"github.com/aporeto-inc/trireme-lib/enforcer/utils/secrets"
"github.com/aporeto-inc/trireme-lib/policy"
"github.com/aporeto-inc/trireme-lib/portset"
)
// A Enforcer is implementing the enforcer that will modify//analyze the capture packets
type Enforcer interface {
// Enforce starts enforcing policies for the given policy.PUInfo.
Enforce(contextID string, puInfo *policy.PUInfo) error
// Unenforce stops enforcing policy for the given IP.
Unenforce(contextID string) error
// GetFilterQueue returns the current FilterQueueConfig.
GetFilterQueue() *fqconfig.FilterQueue
// GetPortSetInstance returns nil for the proxy
GetPortSetInstance() portset.PortSet
// Start starts the PolicyEnforcer.
Start() error
// Stop stops the PolicyEnforcer.
Stop() error
// UpdateSecrets -- updates the secrets of running enforcers managed by trireme. Remote enforcers will get the secret updates with the next policy push
UpdateSecrets(secrets secrets.Secrets) error
}