trireme-lib: go.aporeto.io/trireme-lib/controller/pkg/remoteenforcer Index | Files | Directories

package remoteenforcer

import "go.aporeto.io/trireme-lib/controller/pkg/remoteenforcer"

Index

Package Files

interfaces.go remoteenforcer_linux.go type.go

Constants

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"
    // UpdateSecrets is string for invoking updatesecrets RPC
    UpdateSecrets = "RemoteEnforcer.UpdateSecrets"
    // SetTargetNetworks is string for invoking SetTargetNetworks RPC
    SetTargetNetworks = "RemoteEnforcer.SetTargetNetworks"
)

func LaunchRemoteEnforcer Uses

func LaunchRemoteEnforcer(service packetprocessor.PacketProcessor) error

LaunchRemoteEnforcer launches a remote enforcer

type RemoteEnforcer Uses

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 the 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 Uses

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 Uses

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

EnforcerExit is processing messages from the remote that are requesting an exit. In this case we simply cancel the context.

func (*RemoteEnforcer) InitEnforcer Uses

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 Uses

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) SetTargetNetworks Uses

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

SetTargetNetworks calls the same method on the actual enforcer

func (*RemoteEnforcer) Supervise Uses

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 Uses

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 Uses

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

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

func (*RemoteEnforcer) UpdateSecrets Uses

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

UpdateSecrets updates the secrets used by the remote enforcer

type RemoteIntf Uses

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

PathSynopsis
internal/statsclient/mockstatsclientPackage mockstatsclient is a generated GoMock package.
internal/statscollector/mockstatscollectorPackage mockstatscollector is a generated GoMock package.
mockremoteenforcerPackage mockremoteenforcer is a generated GoMock package.

Package remoteenforcer imports 22 packages (graph) and is imported by 7 packages. Updated 2018-11-15. Refresh now. Tools for package owners.