Documentation
¶
Index ¶
- Constants
- Variables
- func InitializeDynamoDBClient() *dynamodb.Client
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetData() string
- func (x *Event) GetId() string
- func (x *Event) GetOccurredAt() *timestamppb.Timestamp
- func (x *Event) GetType() string
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type EventStore
- type ProviderState
- func (p *ProviderState) DeleteEvents(actorName string, inclusiveToIndex int)
- func (p *ProviderState) DeleteSnapshots(actorName string, inclusiveToIndex int)
- func (p *ProviderState) GetEvents(actorName string, eventIndexStart int, eventIndexEnd int, ...)
- func (p *ProviderState) GetSnapshot(actorName string) (snapshot interface{}, eventIndex int, ok bool)
- func (p *ProviderState) GetSnapshotInterval() int
- func (p *ProviderState) GetState() persistence.ProviderState
- func (p *ProviderState) PersistEvent(actorName string, eventIndex int, event protoreflect.ProtoMessage)
- func (p *ProviderState) PersistSnapshot(actorName string, snapshotIndex int, snapshot protoreflect.ProtoMessage)
- func (p *ProviderState) Restart()
- type Snapshot
- type SnapshotStore
Constants ¶
View Source
const ( PartitionID = "aws" EndpointURL = "http://localhost:4566" )
Variables ¶
View Source
var File_protos_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type Event ¶
type Event struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
OccurredAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=occurred_at,json=occurredAt,proto3" json:"occurred_at,omitempty"`
// contains filtered or unexported fields
}
func (*Event) Descriptor
deprecated
func (*Event) GetOccurredAt ¶ added in v0.1.3
func (x *Event) GetOccurredAt() *timestamppb.Timestamp
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventStore ¶
type EventStore struct {
// contains filtered or unexported fields
}
func NewEventStore ¶
func NewEventStore(client *dynamodb.Client, table string) *EventStore
func (*EventStore) DeleteEvents ¶
func (e *EventStore) DeleteEvents(actorName string, inclusiveToIndex int)
func (*EventStore) GetEvents ¶
func (e *EventStore) GetEvents(actorName string, eventIndexStart int, eventIndexEnd int, callback func(e interface{}))
func (*EventStore) PersistEvent ¶
func (e *EventStore) PersistEvent(actorName string, eventIndex int, event protoreflect.ProtoMessage)
type ProviderState ¶
type ProviderState struct {
// contains filtered or unexported fields
}
ProviderState is an object containing the implementation for the provider
func NewProviderState ¶
func NewProviderState(client *dynamodb.Client) *ProviderState
NewProviderState creates a new instance of ProviderState
func (*ProviderState) DeleteEvents ¶
func (p *ProviderState) DeleteEvents(actorName string, inclusiveToIndex int)
func (*ProviderState) DeleteSnapshots ¶
func (p *ProviderState) DeleteSnapshots(actorName string, inclusiveToIndex int)
func (*ProviderState) GetEvents ¶
func (p *ProviderState) GetEvents(actorName string, eventIndexStart int, eventIndexEnd int, callback func(e interface{}))
func (*ProviderState) GetSnapshot ¶
func (p *ProviderState) GetSnapshot(actorName string) (snapshot interface{}, eventIndex int, ok bool)
func (*ProviderState) GetSnapshotInterval ¶
func (p *ProviderState) GetSnapshotInterval() int
GetSnapshotInterval returns the snapshot interval
func (*ProviderState) GetState ¶
func (p *ProviderState) GetState() persistence.ProviderState
GetState returns the current state of the provider
func (*ProviderState) PersistEvent ¶
func (p *ProviderState) PersistEvent(actorName string, eventIndex int, event protoreflect.ProtoMessage)
func (*ProviderState) PersistSnapshot ¶
func (p *ProviderState) PersistSnapshot(actorName string, snapshotIndex int, snapshot protoreflect.ProtoMessage)
type Snapshot ¶
type Snapshot struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*Snapshot) Descriptor
deprecated
func (*Snapshot) ProtoMessage ¶
func (*Snapshot) ProtoMessage()
func (*Snapshot) ProtoReflect ¶
func (x *Snapshot) ProtoReflect() protoreflect.Message
type SnapshotStore ¶
type SnapshotStore struct {
// contains filtered or unexported fields
}
func NewSnapshotStore ¶
func NewSnapshotStore(client *dynamodb.Client, table string) *SnapshotStore
func (*SnapshotStore) DeleteSnapshots ¶
func (s *SnapshotStore) DeleteSnapshots(actorName string, inclusiveToIndex int)
func (*SnapshotStore) GetSnapshot ¶
func (s *SnapshotStore) GetSnapshot(actorName string) (snapshot interface{}, eventIndex int, ok bool)
func (*SnapshotStore) PersistSnapshot ¶
func (s *SnapshotStore) PersistSnapshot(actorName string, eventIndex int, snapshot protoreflect.ProtoMessage)
Click to show internal directories.
Click to hide internal directories.