Documentation
¶
Index ¶
Constants ¶
View Source
const ( // PutRecordsLimit is the maximum number of records allowed for a PutRecords request. PutRecordsLimit int = 500 // PutRecordsSizeLimit is the maximum allowed size per PutRecords request. PutRecordsSizeLimit int = 5 * 1024 * 1024 // 5MB // RecordSizeLimit is the maximum allowed size per record. RecordSizeLimit int = 1 * 1024 * 1024 // 1MB )
Variables ¶
View Source
var ( // ErrorHandler handles the reporting of an error. ErrorHandler = logErr // ErrMissingTagKey is returned when the tag key environment variable doesn't match. ErrMissingTagKey = errors.New("the tag key is empty, check your template KINESIS_STREAM_TAG_KEY") // ErrMissingTagValue is returned when the tag value environment variable doesn't match. ErrMissingTagValue = errors.New("the tag value is empty, check your template KINESIS_STREAM_TAG_VALUE") )
View Source
var ErrEmptyTmpl = errors.New("the template is empty")
ErrEmptyTmpl is returned when the template is empty.
View Source
var ErrRecordTooBig = errors.New("data byte size is over the limit")
ErrRecordTooBig is raised when a record is too big to be sent.
Functions ¶
func NewAdapter ¶
func NewAdapter(route *router.Route) (router.LogAdapter, error)
NewAdapter creates a kinesis adapter. Called during init.
Types ¶
type Adapter ¶
type Adapter struct { Streams map[string]*Stream StreamTmpl *template.Template TagTmpl *template.Template PKeyTmpl *template.Template }
Adapter represents the logspout adapter for Kinesis.
type Client ¶
type Client interface { Create(*kinesis.CreateStreamInput) (bool, error) Status(*kinesis.DescribeStreamInput) string Tag(*kinesis.AddTagsToStreamInput) error PutRecords(inp *kinesis.PutRecordsInput) (*kinesis.PutRecordsOutput, error) }
Client is a wrapper for the AWS Kinesis client.
type DroppedInputError ¶
DroppedInputError is returned when an input is dropped.
func (*DroppedInputError) Error ¶
func (e *DroppedInputError) Error() string
type Flusher ¶
type Flusher interface {
// contains filtered or unexported methods
}
Flusher flushes the inputs to Amazon Kinesis.
type MissingEnvVarError ¶
type MissingEnvVarError struct {
EnvVar string
}
MissingEnvVarError is return when an environment variable is missing.
func (*MissingEnvVarError) Error ¶
func (e *MissingEnvVarError) Error() string
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream represents a stream that will send messages to its writer.
type StreamNotReadyError ¶
type StreamNotReadyError struct {
Stream string
}
StreamNotReadyError is returned while the stream is being created.
func (*StreamNotReadyError) Error ¶
func (e *StreamNotReadyError) Error() string
Click to show internal directories.
Click to hide internal directories.