Documentation ¶
Index ¶
- type ECSAgent
- func (e *ECSAgent) Close()
- func (e *ECSAgent) GetContainerMetaEndpoint() string
- func (e *ECSAgent) GetTaskMetaEndpoint() string
- func (e *ECSAgent) SetMetaURIEnv() *ECSAgent
- func (e *ECSAgent) Start() *ECSAgent
- func (e *ECSAgent) WithContainerMetaEndpoint(containerCPU int) *ECSAgent
- func (e *ECSAgent) WithContainerMetaEndpointInternalServerError() *ECSAgent
- func (e *ECSAgent) WithContainerMetaEndpointInvalidJSON() *ECSAgent
- func (e *ECSAgent) WithTaskMetaEndpoint(containerCPU, taskCPU int) *ECSAgent
- func (e *ECSAgent) WithTaskMetaEndpointInternalServerError() *ECSAgent
- func (e *ECSAgent) WithTaskMetaEndpointInvalidJSON() *ECSAgent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ECSAgent ¶
type ECSAgent struct {
// contains filtered or unexported fields
}
ECSAgent is a test server that simulates the ECS Agent metadata API.
func NewECSAgent ¶
NewECSAgent builds a new test server that simulates the ECS Agent metadata API. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-metadata-endpoint-v4.html
func (*ECSAgent) GetContainerMetaEndpoint ¶
GetContainerMetaEndpoint returns the container metadata endpoint.
func (*ECSAgent) GetTaskMetaEndpoint ¶
GetTaskMetaEndpoint returns the task metadata endpoint.
func (*ECSAgent) SetMetaURIEnv ¶
SetMetaURIEnv is a helper function to set the server url for ECS_CONTAINER_METADATA_URI_V4 environment variable. This is useful for testing the ECS metadata API.
func (*ECSAgent) WithContainerMetaEndpoint ¶
WithContainerMetaEndpoint sets up the container metadata endpoint on the test server.
func (*ECSAgent) WithContainerMetaEndpointInternalServerError ¶
WithContainerMetaEndpointInternalServerError sets up the container metadata endpoint to return an internal server error.
func (*ECSAgent) WithContainerMetaEndpointInvalidJSON ¶
WithContainerMetaEndpointInvalidJSON sets up the container metadata endpoint to return invalid JSON.
func (*ECSAgent) WithTaskMetaEndpoint ¶
WithTaskMetaEndpoint sets up the task metadata endpoint on the test server.
func (*ECSAgent) WithTaskMetaEndpointInternalServerError ¶
WithTaskMetaEndpointInternalServerError sets up the task metadata endpoint to return an internal server error.
func (*ECSAgent) WithTaskMetaEndpointInvalidJSON ¶
WithTaskMetaEndpointInvalidJSON sets up the task metadata endpoint to return invalid JSON.