Documentation ¶
Index ¶
- func DescribeTasks(t *testing.T, clusterARN, region, taskARN string) (*ecs.DescribeTasksOutput, error)
- func ExecuteRemoteCommand(t *testing.T, testConfig *config.TestConfig, ...) (string, error)
- func GetTaskIDFromARN(taskARN string) string
- func StopTask(t *testing.T, clusterARN, region, taskARN, reason string) string
- type ListTasksResponse
- type LogEvent
- type LogMessages
- type MeshTask
- func (task *MeshTask) ExecuteCommand(container, command string) (string, error)
- func (task *MeshTask) Healthy() bool
- func (task *MeshTask) QueryOpts() *api.QueryOptions
- func (task *MeshTask) Registered() bool
- func (task *MeshTask) TaskARN() (string, error)
- func (task *MeshTask) WriteOpts() *api.WriteOptions
- type MeshTaskConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DescribeTasks ¶
func ExecuteRemoteCommand ¶
func ExecuteRemoteCommand(t *testing.T, testConfig *config.TestConfig, clusterARN, taskARN, container, command string) (string, error)
ExecuteRemoteCommand executes a command inside a container in the task specified by taskARN.
func GetTaskIDFromARN ¶
Types ¶
type ListTasksResponse ¶
type ListTasksResponse struct {
TaskARNs []string `json:"taskArns"`
}
type LogMessages ¶
type LogMessages []LogEvent
func GetCloudWatchLogEvents ¶
func GetCloudWatchLogEvents(t terratestTesting.TestingT, testConfig *config.TestConfig, clusterARN, taskId, containerName string) (LogMessages, error)
GetCloudWatchLogEvents fetches all log events for the given container.
func (LogMessages) Duration ¶
func (lm LogMessages) Duration() time.Duration
Duration returns the difference between the max and min log timestamps. Returns a zero duration if there are zero or one log events.
func (LogMessages) Filter ¶
func (lm LogMessages) Filter(filterStrings ...string) LogMessages
Filter returns those log events that contain any of the filterStrings.
func (LogMessages) Sort ¶
func (lm LogMessages) Sort()
Sort will sort these log events by timestamp.
type MeshTask ¶
type MeshTask struct { MeshTaskConfig // contains filtered or unexported fields }
MeshTask represents a Consul ECS mesh task and provides utility functions for interacting with it.
func NewMeshTask ¶
func NewMeshTask(t *testing.T, cfg MeshTaskConfig) *MeshTask
NewMeshTask creates an instance of a MeshTask. It returns an error if any required configuration fields are missing.
func (*MeshTask) ExecuteCommand ¶
ExecuteCommand runs the command in the given container for the task.
func (*MeshTask) QueryOpts ¶
func (task *MeshTask) QueryOpts() *api.QueryOptions
QueryOpts returns the Consul API query options for the task.
func (*MeshTask) Registered ¶
Registered indicates if the service for the task is registered in Consul.
func (*MeshTask) TaskARN ¶
TaskARN returns the ARN of the task instance for the service. If the ARN is already known it is returned, otherwise it is retrieved using the aws CLI using the properties of the service.
func (*MeshTask) WriteOpts ¶
func (task *MeshTask) WriteOpts() *api.WriteOptions
WriteOpts returns the Consul API write options for the task.