ktail

package module
v0.0.0-...-c6dc708 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2016 License: BSD-3-Clause Imports: 10 Imported by: 0

README

ktail

AWS Kinesis stream tailing package and command line tool

Building project

go get ...

Configurations

Use standard AWS ENV variables: +AWS_ACCESS_KEY_ID +AWS_REGION +AWS_SECRET_ACCESS_KEY Use flags on commandline per usage instructions

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Follower

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

func NewFollower

func NewFollower(region string) *Follower

func NewFollowerWithAPI

func NewFollowerWithAPI(api kinesisiface.KinesisAPI) *Follower

func (*Follower) GetShards

func (f *Follower) GetShards(stream string) ([]string, error)

func (*Follower) ReadRecords

func (f *Follower) ReadRecords(dst chan<- *Record, stream, shard, iterType string, rest time.Duration) <-chan *ReaderResult

func (*Follower) Tail

func (f *Follower) Tail(dst chan<- *Record, stream, iterType string, rest time.Duration) (<-chan *ReaderResult, error)

type ReaderResult

type ReaderResult struct {
	Stream, Shard string
	Err           error
}

ReaderResult indicates the outcome of shard reading procedure. Shard reading may end gracefully when a closed shard's last batch of records was read. In that case, Err will be set to io.EOF.

func (*ReaderResult) String

func (rr *ReaderResult) String() string

String causes ReaderResult to satisfy fmt.Stringer interface.

type Record

type Record struct {
	*kinesis.Record
	Stream string
	Shard  string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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