gateway

package
v3.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MagalixGateway

type MagalixGateway struct {
	MgxAgentGatewayUrl string

	AccountID    uuid.UUID
	ClusterID    uuid.UUID
	ClientSecret []byte

	AgentVersion string
	AgentID      string

	K8sServerVersion string
	AgentPermissions string

	ProtoHandshake     time.Duration
	ProtoWriteTime     time.Duration
	ProtoReadTime      time.Duration
	ProtoReconnectTime time.Duration
	ProtoBackoff       time.Duration

	ShouldSendLogs bool
	// contains filtered or unexported fields
}

func New

func New(
	gatewayUrl string,
	accountID uuid.UUID,
	clusterID uuid.UUID,
	secret []byte,
	agentVersion string,
	agentID string,
	k8sServerVersion string,
	agentPermissions string,
	protoHandshake time.Duration,
	protoWriteTime time.Duration,
	protoReadTime time.Duration,
	protoReconnectTime time.Duration,
	protoBackoff time.Duration,
	sendLogs bool,
) *MagalixGateway

func (*MagalixGateway) GetLogsWriteSyncer

func (g *MagalixGateway) GetLogsWriteSyncer() zapcore.WriteSyncer

func (*MagalixGateway) SendAuditResults added in v3.3.1

func (g *MagalixGateway) SendAuditResults(auditResults []*agent.AuditResult) error

func (*MagalixGateway) SendAuditResultsBatch added in v3.3.1

func (g *MagalixGateway) SendAuditResultsBatch(auditResult []*agent.AuditResult)

func (*MagalixGateway) SendAuditResultsWorker added in v3.6.2

func (g *MagalixGateway) SendAuditResultsWorker(ctx context.Context) error

func (*MagalixGateway) SendEntitiesDeltas

func (g *MagalixGateway) SendEntitiesDeltas(deltas []*agent.Delta) error

func (*MagalixGateway) SendEntitiesResync

func (g *MagalixGateway) SendEntitiesResync(resync *agent.EntitiesResync) error

func (*MagalixGateway) SetAuditCommandHandler added in v3.4.0

func (g *MagalixGateway) SetAuditCommandHandler(handler agent.AuditCommandHandler)

func (*MagalixGateway) SetChangeLogLevelHandler

func (g *MagalixGateway) SetChangeLogLevelHandler(handler agent.ChangeLogLevelHandler)

func (*MagalixGateway) SetConstraintsHandler added in v3.3.1

func (g *MagalixGateway) SetConstraintsHandler(handler agent.ConstraintsHandler)

func (*MagalixGateway) SetRestartHandler

func (g *MagalixGateway) SetRestartHandler(handler agent.RestartHandler)

func (*MagalixGateway) Start

func (g *MagalixGateway) Start(ctx context.Context) error

func (*MagalixGateway) Stop

func (g *MagalixGateway) Stop() error

func (*MagalixGateway) WaitAuthorization

func (g *MagalixGateway) WaitAuthorization(timeout time.Duration) error

Jump to

Keyboard shortcuts

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