Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomPolicyResolver ¶
type CustomPolicyResolver struct {
// contains filtered or unexported fields
}
CustomPolicyResolver is a simple policy engine
func NewCustomPolicyResolver ¶
func NewCustomPolicyResolver(networks []string) *CustomPolicyResolver
NewCustomPolicyResolver creates a new example policy engine for the Trireme package
func (*CustomPolicyResolver) HandlePUEvent ¶
func (p *CustomPolicyResolver) HandlePUEvent(context string, eventType monitor.Event)
HandlePUEvent implements the corresponding interface. We have no state in this example
func (*CustomPolicyResolver) ResolvePolicy ¶
func (p *CustomPolicyResolver) ResolvePolicy(context string, runtimeInfo policy.RuntimeReader) (*policy.PUPolicy, error)
ResolvePolicy implements the Trireme interface. Here we just create a simple policy that accepts packets with the same labels as the target container. We also add some egress/ingress services
func (*CustomPolicyResolver) SetPolicyUpdater ¶
func (p *CustomPolicyResolver) SetPolicyUpdater(pu trireme.PolicyUpdater) error
SetPolicyUpdater is used in order to register a pointer to the policyUpdater We don't implement policy updates in this example
Click to show internal directories.
Click to hide internal directories.