Help us shape the future of Go! Take the 2026 Go Developer Survey

cloudwatchlogs

package
v1.4.31 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxPages    = 3
	MaxRequests = 3
	MaxRows     = 50
	MaxFields   = 40
	MaxBytes    = 32 * 1024
	MaxLookback = 6 * time.Hour
	Timeout     = 8 * time.Second
)

Variables

View Source
var ErrResponse = errors.New("CloudWatch Logs read response exceeded its bound")
View Source
var ErrScope = errors.New("invalid CloudWatch Logs read scope or arguments")

Functions

This section is empty.

Types

type API

func NewToolAPI

func NewToolAPI(ctx context.Context, region string) (API, error)

func NewToolAPIWithHTTPClient

func NewToolAPIWithHTTPClient(ctx context.Context, region string, client aws.HTTPClient) (API, error)

type Reader

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

func NewReader

func NewReader(api API, scope Scope, scrubber core.Scrubber) (*Reader, error)

func (*Reader) Discover

func (reader *Reader) Discover(ctx context.Context, request Request) (Result, error)

func (*Reader) Read

func (reader *Reader) Read(ctx context.Context, request Request) (Result, error)

func (*Reader) Safe

func (reader *Reader) Safe(value string) string

type Record

type Record struct {
	Timestamp string `json:"timestamp"`
	Stream    string `json:"stream"`
	Message   string `json:"message"`
}

type Request

type Request struct {
	Search          string
	LookbackMinutes int
	Limit           int
}

type Result

type Result struct {
	Count      int      `json:"count"`
	Records    []Record `json:"records,omitempty"`
	Fields     []string `json:"fields,omitempty"`
	Sampled    bool     `json:"sampled"`
	Truncated  bool     `json:"truncated"`
	Truncation []string `json:"truncation,omitempty"`
}

type Scope

type Scope struct {
	Region, LogGroupName, LogStreamPrefix, FilterPattern string
}

Jump to

Keyboard shortcuts

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