Documentation
¶
Index ¶
- func FetchCloudwatchLogs(ctx context.Context, logGroupName, logStreamName string, ...) (outputList [][]types.OutputLogEvent, nextToken *string, err error)
- func FetchCpuAndMemoryUsage(ctx context.Context, name, clusterName string, client GetMetricDataApi) (memoryUtilized uint32, memoryReserved uint32, cpuUtilized uint32, ...)
- func FetchLogStreams(ctx context.Context, logGroupName string, containerName, taskArn *string, ...) ([]types.LogStream, error)
- func NewClient(useTracing bool) *cloudwatch.Client
- func NewLogsClient(useTracing bool) *cloudwatchlogs.Client
- func TailLogs(ctx context.Context, logGroupArn string, client StartLiveTailApi) (*cloudwatchlogs.StartLiveTailEventStream, error)
- type DescribeLogStreamsApi
- type GetLogEventsApi
- type GetMetricDataApi
- type StartLiveTailApi
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchCloudwatchLogs ¶
func FetchCloudwatchLogs(ctx context.Context, logGroupName, logStreamName string, nextForwardToken *string, interval time.Duration, client GetLogEventsApi) (outputList [][]types.OutputLogEvent, nextToken *string, err error)
FetchCloudwatchLogs reads the content of a log stream and returns a two dimensional slice of log events
func FetchCpuAndMemoryUsage ¶
func FetchCpuAndMemoryUsage(ctx context.Context, name, clusterName string, client GetMetricDataApi) (memoryUtilized uint32, memoryReserved uint32, cpuUtilized uint32, cpuReserved uint32, err error)
FetchCpuAndMemoryUsage queries cloudwatch for ECS service metrics and returns the following metrics: - MemoryUtilized - MemoryReserved - CpuUtilized - CpuReserved
func FetchLogStreams ¶
func FetchLogStreams(ctx context.Context, logGroupName string, containerName, taskArn *string, client DescribeLogStreamsApi) ([]types.LogStream, error)
FetchLogStreams reads available logstreams from the specified cloudwatch LogGroup and returns them as a slice. The list is filtered to only include streams for the specified container and ECS taskArn and only includes streams that have been written to during the last 30 minutes
func NewClient ¶ added in v0.3.0
func NewClient(useTracing bool) *cloudwatch.Client
func NewLogsClient ¶ added in v0.3.0
func NewLogsClient(useTracing bool) *cloudwatchlogs.Client
func TailLogs ¶ added in v1.0.3
func TailLogs(ctx context.Context, logGroupArn string, client StartLiveTailApi) (*cloudwatchlogs.StartLiveTailEventStream, error)
Types ¶
type DescribeLogStreamsApi ¶
type DescribeLogStreamsApi interface {
DescribeLogStreams(ctx context.Context, input *cloudwatchlogs.DescribeLogStreamsInput, optionFns ...func(*cloudwatchlogs.Options)) (*cloudwatchlogs.DescribeLogStreamsOutput, error)
}
type GetLogEventsApi ¶
type GetLogEventsApi interface {
GetLogEvents(ctx context.Context, input *cloudwatchlogs.GetLogEventsInput, optionFns ...func(*cloudwatchlogs.Options)) (*cloudwatchlogs.GetLogEventsOutput, error)
}
type GetMetricDataApi ¶
type GetMetricDataApi interface {
GetMetricData(ctx context.Context, input *cloudwatch.GetMetricDataInput, optionFns ...func(*cloudwatch.Options)) (*cloudwatch.GetMetricDataOutput, error)
}
type StartLiveTailApi ¶ added in v1.0.3
type StartLiveTailApi interface {
StartLiveTail(ctx context.Context, params *cloudwatchlogs.StartLiveTailInput, optFns ...func(*cloudwatchlogs.Options)) (*cloudwatchlogs.StartLiveTailOutput, error)
}
Click to show internal directories.
Click to hide internal directories.