Documentation
¶
Overview ¶
Package kcl provides a kinesis client library (KCL) implementation for Amazon Web Services. The primary goals of this package are to provide a performant Go KCL while keeping the library idomatic (and readable) and easy to use.
The AWS SDK is configured based on the AWS SDK's default configuration: http://godoc.org/github.com/awslabs/aws-sdk-go/aws#pkg-constants. This means that AWS credentials are loaded using the credentials.NewChainCredentials method. The quickest way to get started using this package is to set the following environmental variables: Access Key ID: AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY, Secret Access Key: AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY, and region: AWS_REGION.
Please report/log issues or feature requests here: https://github.com/suicidejack/kinesis_client_library/issues.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // [REQUIRED] the application's name - it will be the name of the dynamodb // table that tracks this applications name ConsumerGroup string `json:"ConsumerGroup"` // [REQUIRED] the name of stream to consume from StreamName string `json:"streamName"` // run the AWS client in debug mode AWSDebugMode bool `json:"awsDebugMode"` NumRecords int64 `json:"numRecords"` BufferSize int `json:"bufferSize"` QueryFrequency *goprimitives.Duration `json:"queryFrequency"` ReadCapacity int64 `json:"readCapacity"` WriteCapacity int64 `json:"writeCapacity"` // WorkerID a unique ID for this consumer WorkerID string `json:"workerID"` // ConsumerExpirationSeconds the amount of time that a consumer has to checkpoint before // another consumer takes over consuming from that shard ConsumerExpirationSeconds int64 `json:"consumerExpirationSeconds"` // IteratorType valid options are "LATEST" or "TRIM_HORIZON" defaults to "LATEST" IteratorType string `json:"iteratorType"` }
Config for a kinesis producer (high level, stream, etc.)
type StreamConsumer ¶
type StreamConsumer struct {
// contains filtered or unexported fields
}
StreamConsumer TODO
func NewStreamConsumer ¶
func NewStreamConsumer(opts *Config) (consumer *StreamConsumer, err error)
NewStreamConsumer TODO
func (*StreamConsumer) Consume ¶
func (c *StreamConsumer) Consume() chan *KinesisRecord
Consume TODO
func (*StreamConsumer) ValidateStream ¶
func (c *StreamConsumer) ValidateStream() error
ValidateStream checks if the stream exists (or even if you have a valid AWS connection) and returns and error if the stream does not exist
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Godeps
|
|
_workspace/src/github.com/awslabs/aws-sdk-go/aws
Package aws provides core functionality for making requests to AWS services.
|
Package aws provides core functionality for making requests to AWS services. |
_workspace/src/github.com/awslabs/aws-sdk-go/aws/awserr
Package of API error interface accessors for the SDK.
|
Package of API error interface accessors for the SDK. |
_workspace/src/github.com/awslabs/aws-sdk-go/aws/credentials
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
|
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values. |
_workspace/src/github.com/awslabs/aws-sdk-go/internal/apierr
Package of API error types.
|
Package of API error types. |
_workspace/src/github.com/awslabs/aws-sdk-go/service/dynamodb
Package dynamodb provides a client for Amazon DynamoDB.
|
Package dynamodb provides a client for Amazon DynamoDB. |
_workspace/src/github.com/awslabs/aws-sdk-go/service/dynamodb/dynamodbiface
Package dynamodbiface provides an interface that satisfies the dynamodb service.
|
Package dynamodbiface provides an interface that satisfies the dynamodb service. |
_workspace/src/github.com/awslabs/aws-sdk-go/service/kinesis
Package kinesis provides a client for Amazon Kinesis.
|
Package kinesis provides a client for Amazon Kinesis. |
_workspace/src/github.com/awslabs/aws-sdk-go/service/kinesis/kinesisiface
Package kinesisiface provides an interface that satisfies the kinesis service.
|
Package kinesisiface provides an interface that satisfies the kinesis service. |
_workspace/src/github.com/nu7hatch/gouuid
This package provides immutable UUID structs and the functions NewV3, NewV4, NewV5 and Parse() for generating versions 3, 4 and 5 UUIDs as specified in RFC 4122.
|
This package provides immutable UUID structs and the functions NewV3, NewV4, NewV5 and Parse() for generating versions 3, 4 and 5 UUIDs as specified in RFC 4122. |
_workspace/src/github.com/stretchr/testify/assert
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
|
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system. |
_workspace/src/github.com/vaughan0/go-ini
Package ini provides functions for parsing INI configuration files.
|
Package ini provides functions for parsing INI configuration files. |