Documentation
¶
Index ¶
- func Flatten[T any](seq iter.Seq2[[]T, error]) iter.Seq2[T, error]
- func MergeLogEvents(left, right iter.Seq2[LogEvent, error]) iter.Seq2[LogEvent, error]
- func NewCloudWatchLogsClient(ctx context.Context, region aws.Region) (*cloudwatchlogs.Client, error)
- func QueryAndTailLogGroup(ctx context.Context, cwClient LogsClient, lgi LogGroupInput, ...) (iter.Seq2[[]LogEvent, error], error)
- func QueryAndTailLogGroups(ctx context.Context, cwClient LogsClient, start, end time.Time, ...) (iter.Seq2[[]LogEvent, error], error)
- func QueryLogGroup(ctx context.Context, cw FilterLogEventsAPIClient, lgi LogGroupInput, ...) (iter.Seq2[[]LogEvent, error], error)
- func QueryLogGroups(ctx context.Context, cwClient FilterLogEventsAPIClient, start, end time.Time, ...) (iter.Seq2[LogEvent, error], error)
- func TailLogGroup(ctx context.Context, cwClient StartLiveTailAPI, input LogGroupInput) (iter.Seq2[[]LogEvent, error], error)
- func TakeFirstN(seq iter.Seq2[LogEvent, error], n int) iter.Seq2[LogEvent, error]
- func TakeLastN(seq iter.Seq2[LogEvent, error], n int) iter.Seq2[LogEvent, error]
- type FilterLogEventsAPIClient
- type LogEvent
- type LogGroupInput
- type LogsClient
- type StartLiveTailAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeLogEvents ¶
MergeLogEvents merge-sorts two ascending iterators by Timestamp. Uses iter.Pull2 internally for two-pointer merge.
func NewCloudWatchLogsClient ¶
func QueryAndTailLogGroup ¶
func QueryAndTailLogGroup(ctx context.Context, cwClient LogsClient, lgi LogGroupInput, start, end time.Time) (iter.Seq2[[]LogEvent, error], error)
QueryAndTailLogGroup queries the log group from the given start time and initiates a Live Tail session. This function also handles the case where the log group does not exist yet.
func QueryAndTailLogGroups ¶
func QueryAndTailLogGroups(ctx context.Context, cwClient LogsClient, start, end time.Time, lgis ...LogGroupInput) (iter.Seq2[[]LogEvent, error], error)
QueryAndTailLogGroups queries and tails multiple log groups concurrently. Events from different groups are interleaved (not merge-sorted).
func QueryLogGroup ¶
func QueryLogGroups ¶
func TailLogGroup ¶
func TailLogGroup(ctx context.Context, cwClient StartLiveTailAPI, input LogGroupInput) (iter.Seq2[[]LogEvent, error], error)
func TakeFirstN ¶
TakeFirstN yields at most n items from the iterator, then stops.
Types ¶
type FilterLogEventsAPIClient ¶
type FilterLogEventsAPIClient = cloudwatchlogs.FilterLogEventsAPIClient
type LogEvent ¶
type LogEvent = types.LiveTailSessionLogEvent
type LogGroupInput ¶
type LogGroupInput struct {
LogGroupARN string
LogStreamNames []string
LogStreamNamePrefix string
LogEventFilterPattern string
}
LogGroupInput is like cloudwatchlogs.StartLiveTailInput but with only one LogGroup and one LogStream prefix.
type LogsClient ¶
type LogsClient interface {
FilterLogEventsAPIClient
StartLiveTailAPI
}
type StartLiveTailAPI ¶
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.