server

package
v10.353.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controls

type Controls interface {
	Start(context.Context) error
	Stop() error
}

Controls is the controlling interface for starting/stopping the server

type Server

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

Server is the grpcMonitorServer server

func NewMonitorServer

func NewMonitorServer(
	socketAddress string,
	stopchan chan struct{},
	enforcerID string,
	runcWaitGrp *sync.WaitGroup,
) *Server

NewMonitorServer creates a gRPC server for the twistlock defender integration

func (*Server) CNIContainerEvent

CNIContainerEvent handles container event requests

func (*Server) CniPluginInstalled

func (s *Server) CniPluginInstalled(context.Context, *empty.Empty) (*empty.Empty, error)

CniPluginInstalled gets sent by the defender once when the defender has started the runc-proxy.

func (*Server) Register

func (s *Server) Register(name string, monitor external.ReceiveEvents) error

Register will register the given `monitor` for receiving events under `name`. Multiple calls to this function for the same `name` must update the internal state of the implementor to now send events to the newly regitered monitor of this name. Only one registration of a monitor of the same name is allowed.

func (*Server) RunCContainerEvent

RunCContainerEvent handles container event requests

func (*Server) RuncProxyStarted

func (s *Server) RuncProxyStarted(context.Context, *empty.Empty) (*empty.Empty, error)

RuncProxyStarted gets sent by the defender once when the defender has started the runc-proxy.

func (*Server) SenderName

func (s *Server) SenderName() string

SenderName must return a globally unique name of the implementor.

func (*Server) Start

func (s *Server) Start(ctx context.Context) (err error)

Start the grpcMonitorServer gRPC server

func (*Server) Stop

func (s *Server) Stop() error

Stop stops the Monitor' gRPC server (does not stop enforcer)

Jump to

Keyboard shortcuts

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