remoteenforcer

package
v5.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2017 License: GPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InitEnforcer is string for invoking RPC
	InitEnforcer = "RemoteEnforcer.InitEnforcer"
	// InitSupervisor is string for invoking RPC
	InitSupervisor = "RemoteEnforcer.InitSupervisor"
	//Supervise is string for invoking RPC
	Supervise = "RemoteEnforcer.Supervise"
	//Unenforce is string for invoking RPC
	Unenforce = "RemoteEnforcer.Unenforce"
	//Unsupervise is string for invoking RPC
	Unsupervise = "RemoteEnforcer.Unsupervise"
	//Enforce is string for invoking RPC
	Enforce = "RemoteEnforcer.Enforce"
	// EnforcerExit is string for invoking RPC
	EnforcerExit = "RemoteEnforcer.EnforcerExit"
)

Variables

This section is empty.

Functions

func LaunchRemoteEnforcer

func LaunchRemoteEnforcer(service packetprocessor.PacketProcessor) error

LaunchRemoteEnforcer launches a remote enforcer

Types

type RemoteEnforcer

type RemoteEnforcer struct {
	// contains filtered or unexported fields
}

RemoteEnforcer : This is the structure for maintaining state required by the remote enforcer. It is a cache of variables passed by th controller to the remote enforcer and other handles required by the remote enforcer to talk to the external processes

Why is this public when all members are private ? For golang RPC server requirements

func (*RemoteEnforcer) Enforce

func (s *RemoteEnforcer) Enforce(req rpcwrapper.Request, resp *rpcwrapper.Response) error

Enforce this method calls the enforce method on the enforcer created during initenforcer

func (*RemoteEnforcer) EnforcerExit

func (s *RemoteEnforcer) EnforcerExit(req rpcwrapper.Request, resp *rpcwrapper.Response) error

EnforcerExit this method is called when we received a killrpocess message from the controller This allows a graceful exit of the enforcer

func (*RemoteEnforcer) InitEnforcer

func (s *RemoteEnforcer) InitEnforcer(req rpcwrapper.Request, resp *rpcwrapper.Response) error

InitEnforcer is a function called from the controller using RPC. It intializes data structure required by the remote enforcer

func (*RemoteEnforcer) InitSupervisor

func (s *RemoteEnforcer) InitSupervisor(req rpcwrapper.Request, resp *rpcwrapper.Response) error

InitSupervisor is a function called from the controller over RPC. It initializes data structure required by the supervisor

func (*RemoteEnforcer) Supervise

func (s *RemoteEnforcer) Supervise(req rpcwrapper.Request, resp *rpcwrapper.Response) error

Supervise This method calls the supervisor method on the supervisor created during initsupervisor

func (*RemoteEnforcer) Unenforce

func (s *RemoteEnforcer) Unenforce(req rpcwrapper.Request, resp *rpcwrapper.Response) error

Unenforce this method calls the unenforce method on the enforcer created from initenforcer

func (*RemoteEnforcer) Unsupervise

func (s *RemoteEnforcer) Unsupervise(req rpcwrapper.Request, resp *rpcwrapper.Response) error

Unsupervise This method calls the unsupervise method on the supervisor created during initsupervisor

type RemoteIntf

type RemoteIntf interface {
	// InitEnforcer is a function called from the controller using RPC.
	// It intializes data structure required by the remote enforcer
	InitEnforcer(req rpcwrapper.Request, resp *rpcwrapper.Response) error

	// InitSupervisor is a function called from the controller over RPC. It initializes data structure required by the supervisor
	InitSupervisor(req rpcwrapper.Request, resp *rpcwrapper.Response) error

	//Supervise This method calls the supervisor method on the supervisor created during initsupervisor
	Supervise(req rpcwrapper.Request, resp *rpcwrapper.Response) error

	//Unenforce this method calls the unenforce method on the enforcer created from initenforcer
	Unenforce(req rpcwrapper.Request, resp *rpcwrapper.Response) error

	//Unsupervise This method calls the unsupervise method on the supervisor created during initsupervisor
	Unsupervise(req rpcwrapper.Request, resp *rpcwrapper.Response) error

	//Enforce this method calls the enforce method on the enforcer created during initenforcer
	Enforce(req rpcwrapper.Request, resp *rpcwrapper.Response) error

	// EnforcerExit this method is called when  we received a killrpocess message from the controller
	// This allows a graceful exit of the enforcer
	EnforcerExit(req rpcwrapper.Request, resp *rpcwrapper.Response) error
}

RemoteIntf is the interface implemented by the remote enforcer

Directories

Path Synopsis
internal
statsclient/mock
Package mockstatsclient is a generated GoMock package.
Package mockstatsclient is a generated GoMock package.
statscollector/mock
Package mockstatscollector is a generated GoMock package.
Package mockstatscollector is a generated GoMock package.
Package mockremoteenforcer is a generated GoMock package.
Package mockremoteenforcer is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL