dynamodb

package
v0.12.9 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ATTR_LOCK_ID = "LockID"

Terraform requires the DynamoDB table to have a primary key with this name

View Source
const DEFAULT_READ_CAPACITY_UNITS = 1
View Source
const DEFAULT_TEST_REGION = "us-east-1"

For simplicity, do all testing in the us-east-1 region

View Source
const DEFAULT_WRITE_CAPACITY_UNITS = 1
View Source
const MAX_RETRIES_WAITING_FOR_TABLE_TO_BE_ACTIVE = 30

Default is to retry for up to 5 minutes

View Source
const SLEEP_BETWEEN_TABLE_STATUS_CHECKS = 10 * time.Second

Variables

This section is empty.

Functions

func CreateDynamoDbClient added in v0.12.0

func CreateDynamoDbClient(awsRegion, awsProfile string) (*dynamodb.DynamoDB, error)

Create an authenticated client for DynamoDB

func CreateLockTable added in v0.12.0

func CreateLockTable(tableName string, readCapacityUnits int, writeCapacityUnits int, client *dynamodb.DynamoDB, terragruntOptions *options.TerragruntOptions) error

Create a lock table in DynamoDB and wait until it is in "active" state. If the table already exists, merely wait until it is in "active" state.

func CreateLockTableIfNecessary added in v0.12.0

func CreateLockTableIfNecessary(tableName string, client *dynamodb.DynamoDB, terragruntOptions *options.TerragruntOptions) error

Create the lock table in DynamoDB if it doesn't already exist

func DeleteTable added in v0.12.0

func DeleteTable(tableName string, client *dynamodb.DynamoDB) error

Delete the given table in DynamoDB

Types

type CountingSemaphore added in v0.12.0

type CountingSemaphore chan empty

func NewCountingSemaphore added in v0.12.0

func NewCountingSemaphore(size int) CountingSemaphore

A bare-bones counting semaphore implementation based on: http://www.golangpatterns.info/concurrency/semaphores

func (CountingSemaphore) Acquire added in v0.12.0

func (semaphore CountingSemaphore) Acquire()

func (CountingSemaphore) Release added in v0.12.0

func (semaphore CountingSemaphore) Release()

type TableActiveRetriesExceeded

type TableActiveRetriesExceeded struct {
	TableName string
	Retries   int
}

func (TableActiveRetriesExceeded) Error

func (err TableActiveRetriesExceeded) Error() string

type TableDoesNotExist added in v0.12.0

type TableDoesNotExist struct {
	TableName  string
	Underlying error
}

func (TableDoesNotExist) Error added in v0.12.0

func (err TableDoesNotExist) Error() string

Jump to

Keyboard shortcuts

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