ambassador

package
v0.0.0-...-11c5079 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvoyIdHeader = "x-envoy-id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DetachedRunner

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

DetachedRunner can be used to drive an agents.Router with installation and configuration instructions loaded from a JSON file conveying the DetachedInstructions protobuf message.

func NewDetachedRunner

func NewDetachedRunner(agentsRouter agents.Router) *DetachedRunner

func (*DetachedRunner) Load

func (r *DetachedRunner) Load(instructionsFilePath string) error

type EgressConnection

type EgressConnection interface {
	Start(ctx context.Context, supportedAgents []telemetry_edge.AgentType)
	PostLogEvent(agentType telemetry_edge.AgentType, jsonContent string)
	PostMetric(metric *telemetry_edge.Metric)
	PostTestMonitorResults(results *telemetry_edge.TestMonitorResults)
}

func NewEgressConnection

func NewEgressConnection(agentsRunner agents.Router, detachChan chan<- struct{}, idGenerator IdGenerator,
	networkDialOptionCreator NetworkDialOptionCreator) (EgressConnection, error)

NewEgressConnection creates the component that manages connections out to a Salus Ambassador. The detachChan provides a signalling mechanism to the agent runner to let is know when an attachment to an Ambassador was terminated.

func NewStdoutEgressConnection

func NewStdoutEgressConnection() EgressConnection

NewStdoutEgressConnection creates a "stubbed" version of EgressConnection that simply outputs posted metrics and logs rather than actually connecting to an Ambasssador. This is useful for testing in a detached mode.

type IdGenerator

type IdGenerator interface {
	Generate() string
}

func NewIdGenerator

func NewIdGenerator() IdGenerator

type NetworkDialOptionCreator

type NetworkDialOptionCreator interface {
	Create(string) grpc.DialOption
}

func NewNetworkDialOptionCreator

func NewNetworkDialOptionCreator() NetworkDialOptionCreator

type StandardEgressConnection

type StandardEgressConnection struct {
	Address           string
	TlsDisabled       bool
	GrpcCallLimit     time.Duration
	KeepAliveInterval time.Duration
	// contains filtered or unexported fields
}

func (*StandardEgressConnection) PostLogEvent

func (c *StandardEgressConnection) PostLogEvent(agentType telemetry_edge.AgentType, jsonContent string)

func (*StandardEgressConnection) PostMetric

func (c *StandardEgressConnection) PostMetric(metric *telemetry_edge.Metric)

func (*StandardEgressConnection) PostTestMonitorResults

func (c *StandardEgressConnection) PostTestMonitorResults(results *telemetry_edge.TestMonitorResults)

func (*StandardEgressConnection) Start

func (c *StandardEgressConnection) Start(ctx context.Context, supportedAgents []telemetry_edge.AgentType)

type StandardIdGenerator

type StandardIdGenerator struct{}

func (*StandardIdGenerator) Generate

func (g *StandardIdGenerator) Generate() string

type StandardNetworkDialOptionCreator

type StandardNetworkDialOptionCreator struct{}

func (*StandardNetworkDialOptionCreator) Create

create a dial option for the network parameter, (tcp4 or 6)

Jump to

Keyboard shortcuts

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