checkpoint

package
v0.0.0-...-bc6c5c1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTable

func CreateTable(api *dynamodb.DynamoDB, env string, readCapacity, writeCapacity int64) error

CreateTable creates tables with specified capacity

func MakeCreateTableInput

func MakeCreateTableInput(env string, readCapacity, writeCapacity int64) *dynamodb.CreateTableInput

MakeCreateTableInput creates the create table description

func TableName

func TableName(env string) string

TableName provides name of checkpoints table for a given environment

Types

type CP

type CP struct {
	// contains filtered or unexported fields
}

CP is a dynamodb backed implementation of publisher.Checkpointer

func New

func New(env string, api *dynamodb.DynamoDB) *CP

New constructs a new dynamodb backed CP that implements publisher.Checkpointer

func (*CP) Load

func (c *CP) Load(ctx context.Context, key string) (uint64, error)

Load the offset for the specified key from the data store

func (*CP) Save

func (c *CP) Save(ctx context.Context, key string, offset uint64) error

Save the offset for the specified key to the data store

Jump to

Keyboard shortcuts

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