internal

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSError

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

AWSError is a wrapper for any AWS related errors

func (*AWSError) Error

func (e *AWSError) Error() string

type AWSLogsClient

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

AWSLogsClient wraps a cloudwatchlogs.Client

func NewAwsLogsClient

func NewAwsLogsClient() (*AWSLogsClient, error)

NewAwsLogsClient creates a new AWSLogsClient

func (*AWSLogsClient) DescribeLogGroups

func (c *AWSLogsClient) DescribeLogGroups(limit *int64, prefix, nextToken *string) (*cloudwatchlogs.DescribeLogGroupsResponse, error)

DescribeLogGroups is a wrapper of AWS API describe-log-groups

func (*AWSLogsClient) DescribeLogStreams

func (c *AWSLogsClient) DescribeLogStreams(limit *int64, logGroupName *string, prefix *string, sorting *LogStreamSorting, nextToken *string) (*cloudwatchlogs.DescribeLogStreamsResponse, error)

DescribeLogStreams is a wrapper of AWS API describe-log-streams

func (*AWSLogsClient) StreamLogEvents

func (c *AWSLogsClient) StreamLogEvents(params *GetLogsParams, ch chan *LogEvent, watch *bool)

StreamLogEvents streams the log events to the given channel

type GetLogsParams

type GetLogsParams struct {
	Limit          *int64
	StartTime      *int64
	EndTime        *int64
	LogGroupName   *string
	LogStreamNames []string
}

GetLogsParams represents the parameters of function StreamLogEvents

type LRU

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

LRU is a simplified version of golang-lru from hashicorp see: https://github.com/hashicorp/golang-lru

func NewLRU

func NewLRU(size int) (*LRU, error)

NewLRU creates a new LRU instance

func (*LRU) Add

func (u *LRU) Add(key, value interface{}) (evicted bool)

Add adds a new entry to the LRU instance

func (*LRU) Contains

func (u *LRU) Contains(key interface{}) bool

Contains check if the key is in the LRU instance

func (*LRU) Get

func (u *LRU) Get(key interface{}) (value interface{}, ok bool)

Get returns the entry by the given key

func (*LRU) Remove

func (u *LRU) Remove(key interface{}) bool

Remove deletes the key from the LRU instance

type LogEvent

type LogEvent struct {
	Message    string
	EventID    string
	GroupName  string
	StreamName string
	Error      error
}

LogEvent represents an AWS log event

type LogStreamSorting

type LogStreamSorting struct {
	Descending *bool
	OrderBy    cloudwatchlogs.OrderBy
}

LogStreamSorting represents the arguments for sorting of log streams

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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