cloudwatchlogs

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package cloudwatchlogs scopes CloudWatchLogs-specific utiltities for Sparta

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSLogs

type AWSLogs struct {
	// Data is the raw, gzip'd, Base64 encoded payload.  Use
	// DecodedData() to access the log entries
	Data string `json:"data"`
}

AWSLogs is the primary key scoping CloudWatchLogs data in the lambda event

func (*AWSLogs) DecodedData

func (awsLogs *AWSLogs) DecodedData() (*CloudWatchLogEvent, error)

DecodedData returns the Base64 decoded, gunzip'd decoded data per http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/Subscriptions.html You should expect to see a response with an array of Amazon Kinesis. The Data attribute in the Amazon Kinesis record is Base64 encoded and compressed with the gzip format. You can examine the raw data from the command line using the following Unix commands: echo -n "<Content of Data>" | base64 -d | zcat

type CloudWatchLogEvent

type CloudWatchLogEvent struct {
	MessageType         string     `json:"messageType"`
	Owner               string     `json:"owner"`
	LogGroup            string     `json:"logGroup"`
	LogStream           string     `json:"logStream"`
	SubscriptionFilters []string   `json:"subscriptionFilters"`
	LogEvents           []LogEvent `json:"logEvents"`
}

CloudWatchLogEvent represents the base64 decoded, gunzip'd data

type Event

type Event struct {
	AWSLogs AWSLogs `json:"awslogs"`
}

Event data

type LogEvent

type LogEvent struct {
	ID        string `json:"id"`
	Timestamp int64  `json:"timestamp"`
	Message   string `json:"message"`
}

LogEvent represents an entry to process

Jump to

Keyboard shortcuts

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