logs

package
v0.1.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg aws.Config) *Client

func (*Client) CreateLogGroup

func (c *Client) CreateLogGroup(ctx context.Context, name string) error

CreateLogGroup creates a new log group with the given name.

func (*Client) FetchEvents

func (c *Client) FetchEvents(ctx context.Context, groups []string, start time.Time) ([]TailEvent, time.Time, error)

FetchEvents pulls events from the provided log groups and returns them ordered by timestamp.

func (*Client) ListLogGroups

func (c *Client) ListLogGroups(ctx context.Context, nextToken *string) ([]LogGroup, *string, error)

ListLogGroups returns a page of log groups and the next token, if any.

type CloudWatchLogsAPI

type CloudWatchLogsAPI interface {
	DescribeLogGroups(ctx context.Context, params *cloudwatchlogs.DescribeLogGroupsInput, optFns ...func(*cloudwatchlogs.Options)) (*cloudwatchlogs.DescribeLogGroupsOutput, error)
	FilterLogEvents(ctx context.Context, params *cloudwatchlogs.FilterLogEventsInput, optFns ...func(*cloudwatchlogs.Options)) (*cloudwatchlogs.FilterLogEventsOutput, error)
	CreateLogGroup(ctx context.Context, params *cloudwatchlogs.CreateLogGroupInput, optFns ...func(*cloudwatchlogs.Options)) (*cloudwatchlogs.CreateLogGroupOutput, error)
}

CloudWatchLogsAPI captures the AWS SDK methods we use.

type LogGroup

type LogGroup struct {
	Name          string
	RetentionDays int32
	StoredBytes   int64
}

type TailEvent

type TailEvent struct {
	Timestamp time.Time
	LogGroup  string
	LogStream string
	Message   string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL