Documentation ¶
Index ¶
Constants ¶
const ELASTIC_VERSION = "v0.0.1"
ELASTIC_VERSION is the current version of the elastic stack.
Variables ¶
This section is empty.
Functions ¶
func DiscardLogger ¶ added in v0.0.2
DiscardLogger returns a mute logger. Pass the mute logger to 'SetDefaultLogger' to disable library internal logging.
func SetDefaultLogger ¶ added in v0.0.2
SetDefaultLogger allows to override the internal default logger used by the library.
Types ¶
type ElasticStoreConfig ¶ added in v0.0.2
type ElasticStoreConfig struct { // LoadAWSConfig is used as fallback solution to get the needed AWS config // to initiate AWS service clients. LoadAWSConfig func() (aws.Config, error) // DynamodbClient presents the AWS SDK V2 client for Dynamodb service. // If not found the library tries to initiate it from the resolved AWS Config. DynamodbClient dynamodb.ClientAPI // EnableTracing is enabled by default. By default it enable X-Ray tracing // at dynamodb event store level. EnableTracing bool // contains filtered or unexported fields }
ElasticStoreConfig presents the config used by The Elastic Event Store client. It mainly serves as facade for the specific infra implementation of the event store.
func (*ElasticStoreConfig) AddDynamodbStoreOption ¶ added in v0.0.2
func (esc *ElasticStoreConfig) AddDynamodbStoreOption(opt func(*dynamodb.StoreConfig))
type EventStore ¶
EventStore interface combines the following low-level Event Store related interfaces:
- event.Store: defines an event store that support event logging pattern;
- sourcing.Store: defines an event store that support event sourcing pattern;
- event.Streamer: defines an event store that support streaming event from the global stream;
func NewElasticStore ¶ added in v0.0.2
func NewElasticStore(dynamodbTable string, opts ...func(*ElasticStoreConfig)) EventStore
NewElasticStore returns a client for the Elastic Event Store, which is built on Dynamodb, supporting event-sourcing, and event-logging patterns.
If underlying infra SDK clients are not found in the config, it will attempt to initiate them using the default environment configuration.
Note that tracing is enabled by default, and AWS X-Ray service is used under the hood.