consumer

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

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

Go to latest
Published: Aug 13, 2018 License: MIT Imports: 11 Imported by: 0

README

ddbstreams-consumer

GoDoc

Usage

import (
	consumer "github.com/atsushi-ishibashi/ddbstreams-consumer"
)

func main() {
	c, err := consumer.New("<AppName>", "<DynamoDBStreams ARN>", "<DynamoDB TableName>")
	if err != nil {
		log.Fatalln(err)
	}

	queue := c.GetChannel()
	for v := range queue {
		// do something
	}
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidMaxWait    = errors.New("invalid max wait")
	ErrInvalidChannelCap = errors.New("invalid channel cap")
)

Functions

This section is empty.

Types

type Consumer

type Consumer interface {
	SetMaxWait(i int) error
	SetChannelCap(i int) error
	GetChannel() <-chan *dynamodbstreams.Record
}

func New

func New(appName, streamName, tableName string) (Consumer, error)

Jump to

Keyboard shortcuts

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