Documentation
¶
Index ¶
- func AppEnvironment(ctx context.Context, ag *agentconfig.Container) (map[string]string, error)
- func GetAmbassadorCloudConnectionInfo(ctx context.Context, address string) (*rpc.AmbassadorCloudConnection, error)
- func Main(ctx context.Context, args ...string) error
- func OtelResources(ctx context.Context, c Config) []attribute.KeyValue
- func SftpServer(ctx context.Context, sftpPortCh chan<- uint16) error
- func TalkToManager(ctx context.Context, address string, info *rpc.AgentInfo, state State) error
- type Config
- type InterceptState
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppEnvironment ¶
AppEnvironment returns the environment visible to this agent together with environment variables explicitly declared for the app container and minus the environment variables provided by this config.
func GetAmbassadorCloudConnectionInfo ¶ added in v2.2.0
func OtelResources ¶ added in v2.7.0
func SftpServer ¶ added in v2.4.7
SftpServer creates a listener on the next available port, writes that port on the given channel, and then starts accepting connections on that port. Each connection starts a sftp-server that communicates with that connection using its stdin and stdout.
Types ¶
type Config ¶
type InterceptState ¶ added in v2.6.0
type InterceptState interface { State InterceptConfigs() []*agentconfig.Intercept InterceptInfo(ctx context.Context, callerID, path string, containerPort uint16, headers http.Header) (*restapi.InterceptInfo, error) HandleIntercepts(ctx context.Context, cepts []*manager.InterceptInfo) []*manager.ReviewInterceptRequest }
An InterceptState implements what's needed to intercept one port.
func NewInterceptState ¶ added in v2.6.0
func NewInterceptState(s State, forwarder forwarder.Interceptor, intercepts []*agentconfig.Intercept, mountPoint string, env map[string]string) InterceptState
NewInterceptState creates a InterceptState that performs intercepts by using an Interceptor which indiscriminately intercepts all traffic to the port that it forwards.
type State ¶
type State interface { Config AddInterceptState(is InterceptState) AgentState() restapi.AgentState InterceptStates() []InterceptState HandleIntercepts(ctx context.Context, cepts []*manager.InterceptInfo) []*manager.ReviewInterceptRequest ManagerClient() manager.ManagerClient ManagerVersion() semver.Version SessionInfo() *manager.SessionInfo SetManager(sessionInfo *manager.SessionInfo, manager manager.ManagerClient, version semver.Version) FtpPort() uint16 SftpPort() uint16 WaitForFtpPort(ctx context.Context, ch <-chan uint16) error WaitForSftpPort(ctx context.Context, ch <-chan uint16) error }
State reflects the current state of the agent.