agent

package
v0.0.0-...-1a56975 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Domain           string
	Namespace        namespace.Instance
	Galley           galley.Instance
	AppFactory       application.Factory
	PortManager      reserveport.PortManager
	ServiceName      string
	Version          string
	DiscoveryAddress *net.TCPAddr
	TmpDir           string
	EnvoyLogLevel    envoy.LogLevel
}

type Instance

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

Instance manages the application and the sidecar proxy.

func New

func New(cfg Config) (*Instance, error)

New creates new agent instance

func (*Instance) CheckConfiguredForService

func (a *Instance) CheckConfiguredForService(target *Instance) error

CheckConfiguredForService implements the agent.Instance interface.

func (*Instance) Close

func (a *Instance) Close() (err error)

Close implements the agent.Instance interface.

func (*Instance) FindFirstPortForProtocol

func (a *Instance) FindFirstPortForProtocol(protocol model.Protocol) (*MappedPort, error)

FindFirstPortForProtocol is a utility method to simplify lookup of a port for a given protocol.

func (*Instance) GetAdminPort

func (a *Instance) GetAdminPort() int

GetAdminPort implements the agent.Instance interface.

func (*Instance) GetConfig

func (a *Instance) GetConfig() model.Config

GetConfig implements the agent.Instance interface.

func (*Instance) GetNodeID

func (a *Instance) GetNodeID() string

GetNodeID returns the envoy metadata ResourceID for pilot's service discovery.

func (*Instance) GetPorts

func (a *Instance) GetPorts() []*MappedPort

GetPorts implements the agent.Instance interface.

type MappedPort

type MappedPort struct {
	Name            string
	Protocol        model.Protocol
	ProxyPort       int
	ApplicationPort int
}

MappedPort provides a single port mapping between an Envoy proxy and its backend application.

Jump to

Keyboard shortcuts

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