Documentation ¶
Overview ¶
Package cloudwatchlogs provides a client to make API requests to Amazon CloudWatch Logs.
Package cloudwatchlogs contains utility functions for Cloudwatch Logs client.
Index ¶
Constants ¶
View Source
const ( // SleepDuration is the sleep time for making the next request for log events. SleepDuration = 1 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudWatchLogs ¶
type CloudWatchLogs struct {
// contains filtered or unexported fields
}
CloudWatchLogs wraps an AWS Cloudwatch Logs client.
func New ¶
func New(s *session.Session) *CloudWatchLogs
New returns a CloudWatchLogs configured against the input session.
func (*CloudWatchLogs) LogEvents ¶ added in v0.4.0
func (c *CloudWatchLogs) LogEvents(opts LogEventsOpts) (*LogEventsOutput, error)
LogEvents returns an array of Cloudwatch Logs events.
type Event ¶
type Event struct { LogStreamName string `json:"logStreamName"` IngestionTime int64 `json:"ingestionTime"` Message string `json:"message"` Timestamp int64 `json:"timestamp"` }
Event represents a log event.
func (*Event) HumanString ¶
HumanString returns the stringified LogEvent struct with human readable format.
func (*Event) JSONString ¶
JSONString returns the stringified LogEvent struct with json format.
type LogEventsOpts ¶ added in v0.4.0
type LogEventsOpts struct { LogGroup string LogStreamPrefixFilters []string // If nil, retrieve logs from all log streams. Limit *int64 StartTime *int64 EndTime *int64 StreamLastEventTime map[string]int64 LogStreamLimit int }
LogEventsOpts wraps the parameters to call LogEvents.
type LogEventsOutput ¶
type LogEventsOutput struct { // Retrieved log events. Events []*Event // Timestamp for the last event StreamLastEventTime map[string]int64 }
LogEventsOutput contains the output for LogEvents
Click to show internal directories.
Click to hide internal directories.