Documentation
¶
Index ¶
- Constants
- type DescribeStreamResponse
- type Error
- type GetRecordsResponse
- type GetShardIteratorResponse
- type HashKeyRange
- type Kinesis
- func (k *Kinesis) CreateStream(name string, shardCount int) error
- func (k *Kinesis) DeleteStream(name string) error
- func (k *Kinesis) DescribeStream(name string) (resp *StreamDescription, err error)
- func (k *Kinesis) GetRecords(shardIterator string, limit int) (resp *GetRecordsResponse, err error)
- func (k *Kinesis) GetShardIterator(shardId, streamName string, iteratorType ShardIteratorType, ...) (resp *GetShardIteratorResponse, err error)
- func (k *Kinesis) ListStreams() (resp *ListStreamResponse, err error)
- func (k *Kinesis) MergeShards(streamName, shardToMerge, adjacentShard string) error
- func (k *Kinesis) PutRecord(streamName, partitionKey string, data []byte, hashKey, sequenceNumber string) (resp *PutRecordResponse, err error)
- func (k *Kinesis) PutRecords(streamName string, records []PutRecordsRequestEntry) (resp *PutRecordsResponse, err error)
- func (k *Kinesis) SplitShard(streamName, shard, startingHashKey string) error
- type ListStreamResponse
- type PutRecordResponse
- type PutRecordsRequestEntry
- type PutRecordsResponse
- type PutRecordsResultEntry
- type Query
- func (q *Query) AddAdjacentShardToMerge(shard string)
- func (q *Query) AddData(data []byte)
- func (q *Query) AddExclusiveStartShardId(shardId string)
- func (q *Query) AddExplicitHashKey(hashKey string)
- func (q *Query) AddLimit(limit int)
- func (q *Query) AddNewStartingHashKey(hashKey string)
- func (q *Query) AddPartitionKey(partitionKey string)
- func (q *Query) AddRecords(records []PutRecordsRequestEntry)
- func (q *Query) AddSequenceNumberForOrdering(sequenceNumber string)
- func (q *Query) AddShardCount(count int)
- func (q *Query) AddShardId(id string)
- func (q *Query) AddShardIterator(iterator string)
- func (q *Query) AddShardIteratorType(t ShardIteratorType)
- func (q *Query) AddShardToMerge(shard string)
- func (q *Query) AddShardToSplit(shard string)
- func (q *Query) AddStartingSequenceNumber(sequenceNumber string)
- func (q *Query) AddStreamName(name string)
- func (q *Query) String() string
- type Record
- type SequenceNumberRange
- type Shard
- type ShardIteratorType
- type StreamDescription
- type StreamStatus
Constants ¶
const ( // Start reading exactly from the position denoted by a specific sequence number. ShardIteratorAtSequenceNumber ShardIteratorType = "AT_SEQUENCE_NUMBER" // Start reading right after the position denoted by a specific sequence number. ShardIteratorAfterSequenceNumber ShardIteratorType = "AFTER_SEQUENCE_NUMBER" // Start reading at the last untrimmed record in the shard in the system, // which is the oldest data record in the shard. ShardIteratorTrimHorizon ShardIteratorType = "TRIM_HORIZON" // Start reading just after the most recent record in the shard, // so that you always read the most recent data in the shard. ShardIteratorLatest ShardIteratorType = "LATEST" // The stream is being created. Upon receiving a CreateStream request, // Amazon Kinesis immediately returns and sets StreamStatus to CREATING. StreamStatusCreating StreamStatus = "CREATING" // The stream is being deleted. After a DeleteStream request, // the specified stream is in the DELETING state until Amazon Kinesis completes the deletion. StreamStatusDeleting StreamStatus = "DELETING" // The stream exists and is ready for read and write operations or deletion. // You should perform read and write operations only on an ACTIVE stream. StreamStatusActive StreamStatus = "ACTIVE" // Shards in the stream are being merged or split. // Read and write operations continue to work while the stream is in the UPDATING state. StreamStatusUpdating StreamStatus = "UPDATING" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DescribeStreamResponse ¶
type DescribeStreamResponse struct {
StreamDescription StreamDescription
}
Represents the output of a DescribeStream operation.
type Error ¶
type Error struct { StatusCode int // HTTP status code (200, 403, ...) Status string Code string `json:"__type"` Message string `json:"message"` }
Error represents an error in an operation with Kinesis(following goamz/Dynamodb)
type GetRecordsResponse ¶
Represents the output of a GetRecords operation.
type GetShardIteratorResponse ¶
type GetShardIteratorResponse struct {
ShardIterator string
}
Represents the output of a GetShardIterator operation.
type HashKeyRange ¶
The range of possible hash key values for the shard, which is a set of ordered contiguous positive integers.
func (HashKeyRange) String ¶
func (h HashKeyRange) String() string
type Kinesis ¶
Main Kinesis object
func (*Kinesis) CreateStream ¶
This operation adds a new Amazon Kinesis stream to your AWS account.
func (*Kinesis) DeleteStream ¶
This operation deletes a stream and all of its shards and data.
func (*Kinesis) DescribeStream ¶
func (k *Kinesis) DescribeStream(name string) (resp *StreamDescription, err error)
This operation returns the following information about the stream: the current status of the stream, the stream Amazon Resource Name (ARN), and an array of shard objects that comprise the stream.
func (*Kinesis) GetRecords ¶
func (k *Kinesis) GetRecords(shardIterator string, limit int) (resp *GetRecordsResponse, err error)
This operation returns one or more data records from a shard.
func (*Kinesis) GetShardIterator ¶
func (k *Kinesis) GetShardIterator(shardId, streamName string, iteratorType ShardIteratorType, sequenceNumber string) (resp *GetShardIteratorResponse, err error)
This operation returns a shard iterator in ShardIterator. The shard iterator specifies the position in the shard from which you want to start reading data records sequentially.
func (*Kinesis) ListStreams ¶
func (k *Kinesis) ListStreams() (resp *ListStreamResponse, err error)
This operation returns an array of the names of all the streams that are associated with the AWS account making the ListStreams request.
func (*Kinesis) MergeShards ¶
This operation merges two adjacent shards in a stream and combines them into a single shard to reduce the stream's capacity to ingest and transport data.
func (*Kinesis) PutRecord ¶
func (k *Kinesis) PutRecord(streamName, partitionKey string, data []byte, hashKey, sequenceNumber string) (resp *PutRecordResponse, err error)
This operation puts a data record into an Amazon Kinesis stream from a producer.
func (*Kinesis) PutRecords ¶
func (k *Kinesis) PutRecords(streamName string, records []PutRecordsRequestEntry) (resp *PutRecordsResponse, err error)
This operation puts multiple data records into an Amazon Kinesis stream from a producer.
func (*Kinesis) SplitShard ¶
This operation splits a shard into two new shards in the stream, to increase the stream's capacity to ingest and transport data.
type ListStreamResponse ¶
Represents the output of a ListStreams operation.
type PutRecordResponse ¶
Represents the output of a PutRecord operation.
type PutRecordsRequestEntry ¶
type PutRecordsRequestEntry struct { PartitionKey string HashKey string `json:"ExplicitHashKey,omitempty"` Data []byte }
The unit of data put to the Amazon Kinesis stream by PutRecords, which includes a partition key, a hash key, and a data blob.
type PutRecordsResponse ¶
type PutRecordsResponse struct { FailedRecordCount int Records []PutRecordsResultEntry }
Represents the output of a PutRecords operation.
type PutRecordsResultEntry ¶
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
func NewEmptyQuery ¶
func NewEmptyQuery() *Query
func NewQueryWithStream ¶
func (*Query) AddAdjacentShardToMerge ¶
func (*Query) AddExclusiveStartShardId ¶
func (*Query) AddExplicitHashKey ¶
func (*Query) AddNewStartingHashKey ¶
func (*Query) AddPartitionKey ¶
func (*Query) AddRecords ¶
func (q *Query) AddRecords(records []PutRecordsRequestEntry)
func (*Query) AddSequenceNumberForOrdering ¶
func (*Query) AddShardCount ¶
func (*Query) AddShardId ¶
func (*Query) AddShardIterator ¶
func (*Query) AddShardIteratorType ¶
func (q *Query) AddShardIteratorType(t ShardIteratorType)
func (*Query) AddShardToMerge ¶
func (*Query) AddShardToSplit ¶
func (*Query) AddStartingSequenceNumber ¶
func (*Query) AddStreamName ¶
type Record ¶
The unit of data of the Amazon Kinesis stream, which is composed of a sequence number, a partition key, and a data blob.
type SequenceNumberRange ¶
The range of possible sequence numbers for the shard.
func (SequenceNumberRange) String ¶
func (s SequenceNumberRange) String() string
type Shard ¶
type Shard struct { AdjacentParentShardId string HashKeyRange HashKeyRange ParentShardId string SequenceNumberRange SequenceNumberRange ShardId string }
A uniquely identified group of data records in an Amazon Kinesis stream.
type ShardIteratorType ¶
type ShardIteratorType string
type StreamDescription ¶
type StreamDescription struct { HasMoreShards bool Shards []Shard StreamARN string StreamName string StreamStatus StreamStatus }
Description of a Stream
type StreamStatus ¶
type StreamStatus string