Documentation ¶
Index ¶
Constants ¶
const ( // TypeMemory indicates the in-memory selection. TypeMemory = "MEMORY" // TypeDynamo indicates the AWS DynamoDB selection. TypeDynamo = "DYNAMODB" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct { Memory *MemoryComponent Dynamo *DynamoComponent }
Component is the top level aggregate of all store components.
type Config ¶
type Config struct { Type string `description:"The type of data store to use for results tracking."` Memory *MemoryConfig Dynamo *DynamoConfig }
Config is the top level aggregate of all store implemenations.
type DynamoComponent ¶
type DynamoComponent struct {
DynamoDB *awscmp.DynamoDBComponent
}
DynamoComponent implements the component interface for the in-memory option.
func NewDynamoComponent ¶
func NewDynamoComponent() *DynamoComponent
NewDynamoComponent constructs a default DynamoComponent.
func (*DynamoComponent) New ¶
func (c *DynamoComponent) New(ctx context.Context, conf *DynamoConfig) (domain.Store, error)
New constructs the component.
func (*DynamoComponent) Settings ¶
func (c *DynamoComponent) Settings() *DynamoConfig
Settings returns the default configuration.
type DynamoConf ¶
type DynamoConf struct {
*awscmp.DynamoDBConfig
}
DynamoConf wraps the original config to add a name.
type DynamoConfig ¶
type DynamoConfig struct { TableName string `description:"The name of the DynamoDB table to use."` PartitionKey string `description:"Name of the table partition key."` TTLKey string `description:"Name of the TTL key."` AWS *DynamoConf }
DynamoConfig contains all settings for the in-memory component.
type DynamoDB ¶
type DynamoDB struct { Client dynamodbiface.DynamoDBAPI TableName string PartitionKeyName string TTLKeyName string }
DynamoDB implements store using AWS DynamoDB.
type Memory ¶
Memory is an in-memory implementation of the store. This may be used for cases where only one instance of the service is running but is not compatible with multi-node deployments.
Note: This implementation does not clean up after itself and will grow unbounded over time. This is not for production use.
type MemoryComponent ¶
type MemoryComponent struct{}
MemoryComponent implements the component interface for the in-memory option.
func NewMemoryComponent ¶
func NewMemoryComponent() *MemoryComponent
NewMemoryComponent constructs a default MemoryComponent.
func (*MemoryComponent) New ¶
func (*MemoryComponent) New(ctx context.Context, conf *MemoryConfig) (domain.Store, error)
New constructs the component.
func (*MemoryComponent) Settings ¶
func (*MemoryComponent) Settings() *MemoryConfig
Settings returns the default configuration.
type MemoryConfig ¶
type MemoryConfig struct{}
MemoryConfig contains all settings for the in-memory component.