Documentation
¶
Index ¶
Constants ¶
View Source
const CorrelationIDAttribute = "correlationID"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamoClient ¶
type DynamoClient interface {
PutItem(ctx context.Context, params *dynamodb.PutItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error)
}
type DynamoStore ¶
type DynamoStore struct {
// contains filtered or unexported fields
}
func NewDynamoStore ¶
func NewDynamoStore(client *dynamodb.Client, targetTable string) *DynamoStore
func (*DynamoStore) PersistEvent ¶
func (d *DynamoStore) PersistEvent(ctx context.Context, event SomeDomainEvent) error
type EventReceiver ¶
type EventReceiver struct {
// contains filtered or unexported fields
}
func NewEventReceiver ¶
func NewEventReceiver(client SQSClient, targetQueueURL string, options ...EventReceiverOption) *EventReceiver
NewEventReceiver creates an EventReceiver instance. By default, it will use github.com/google/uuid.NewString() to generate event IDs, however this may be overridden by providing a WithIDGenerator option.
func (*EventReceiver) ReceiveInboundEvent ¶
func (e *EventReceiver) ReceiveInboundEvent(ctx context.Context, source, message string) error
type EventReceiverOption ¶
type EventReceiverOption func(er *EventReceiver)
func WithIDGenerator ¶
func WithIDGenerator(idGenerator IDGenerator) EventReceiverOption
type IDGenerator ¶
type IDGenerator func() string
type SQSClient ¶
type SQSClient interface {
SendMessage(ctx context.Context, params *sqs.SendMessageInput, optFns ...func(*sqs.Options)) (*sqs.SendMessageOutput, error)
}
type SomeDomainEvent ¶
Click to show internal directories.
Click to hide internal directories.