Documentation ¶
Index ¶
- type GetCondition
- type IteratorType
- type Kinesis
- func (svc *Kinesis) CreateStream(in *SDK.CreateStreamInput) error
- func (svc *Kinesis) CreateStreamWithName(name string) error
- func (svc *Kinesis) Errorf(format string, v ...interface{})
- func (svc *Kinesis) ForceDeleteStream(name string) error
- func (svc *Kinesis) GetStream(name string) (*Stream, error)
- func (svc *Kinesis) Infof(format string, v ...interface{})
- func (svc *Kinesis) IsExistStream(name string) (bool, error)
- func (svc *Kinesis) SetLogger(logger log.Logger)
- type RecordResult
- type Stream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetCondition ¶
type GetCondition struct { ShardID string ShardIterator string ShardIteratorType IteratorType Limit int64 }
GetCondition has option values for `GetRecord` operation.
type IteratorType ¶
type IteratorType string
IteratorType is ShardIteratorType.
const ( IteratorTypeLatest IteratorType = "LATEST" IteratorTypeTrimHorizon IteratorType = "TRIM_HORIZON" )
ShardIteratorType
func (IteratorType) String ¶
func (it IteratorType) String() string
String returns the IteratorType as string type. If it's empty string, then returns `LATEST`.
type Kinesis ¶
type Kinesis struct {
// contains filtered or unexported fields
}
Kinesis has Kinesis client.
func (*Kinesis) CreateStream ¶
func (svc *Kinesis) CreateStream(in *SDK.CreateStreamInput) error
CreateStream creates new Kinesis Stream.
func (*Kinesis) CreateStreamWithName ¶
CreateStreamWithName creates new Kinesis Stream by given name with prefix.
func (*Kinesis) ForceDeleteStream ¶
ForceDeleteStream deletes Kinesis stream by given name with prefix.
func (*Kinesis) IsExistStream ¶
IsExistStream checks if the Stream already exists or not.
type RecordResult ¶
type RecordResult struct { ShardID string Items []*SDK.Record Count int NextShardIterator string Behind int64 }
RecordResult is struct for result of `GetRecord` operation.
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream is Kinesis Stream wrapper struct.
func (*Stream) GetLatestRecords ¶
func (s *Stream) GetLatestRecords() ([]RecordResult, error)
GetLatestRecords gets records from all of the shards.
func (*Stream) GetRecords ¶
func (s *Stream) GetRecords(cond GetCondition) (RecordResult, error)
GetRecords gets record fron given condition.
func (*Stream) GetShardIDs ¶
GetShardIDs returns shard id list of the stream.