Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster represents the cluster node
func NewCluster ¶
func NewCluster(ctx context.Context, raftPort uint16, discovery discovery.Provider, writeClient cospb.WriteSideHandlerServiceClient, journalStore storage.LegacyJournalStore, partitionsCount int, logger log.Logger, logLevel log.Level) *Cluster
NewCluster creates an instance of Cluster
func (*Cluster) SendCommand ¶
func (n *Cluster) SendCommand(ctx context.Context, command *partiv1.SendRequest) (*local.StateWrapper, error)
SendCommand sends a command to the cluster
type Entity ¶
type Entity struct {
// contains filtered or unexported fields
}
Entity represents each persistence entity
func NewEntity ¶
func NewEntity(entityID string, partition uint32, writeClient cospb.WriteSideHandlerServiceClient, journalStore storage.LegacyJournalStore, logger log.Logger) *Entity
NewEntity creates an instance of Entity
func (*Entity) Process ¶
func (e *Entity) Process(ctx context.Context, msg *local.EntityMessage) (resp *local.StateWrapper, err error)
Process a single message for this entity
type EntityFactory ¶
EntityFactory generates a new entity for the entity store
type EntityStore ¶
type EntityStore struct {
// contains filtered or unexported fields
}
EntityStore manges entities, creating, caching, and passivating them
func NewEntityStore ¶
func NewEntityStore(factory EntityFactory, logger log.Logger) *EntityStore
NewEntityStore creates an instance of EntityStore
func (*EntityStore) GetOrCreate ¶
GetOrCreate retrieves an entity or generates one with the provided factory
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles the lifecycle of a given partition and how the given partition processes messages sent to it
func NewHandler ¶
func NewHandler(writeClient cospb.WriteSideHandlerServiceClient, journalStore storage.LegacyJournalStore, logger log.Logger) *Handler
NewHandler creates an instance of Handler
func (*Handler) Handle ¶
func (e *Handler) Handle(ctx context.Context, partitionID uint32, msg *anypb.Any) (*anypb.Any, error)
Handle a message for a given partition
func (*Handler) ShutdownPartition ¶
ShutdownPartition shuts down the partition on this node
type Partition ¶
type Partition struct {
// contains filtered or unexported fields
}
Partition manages messages and entities for a single partition
func NewPartition ¶
func NewPartition(ctx context.Context, id uint32, logger log.Logger, writeClient cospb.WriteSideHandlerServiceClient, journalStore storage.LegacyJournalStore) *Partition
NewPartition returns a new partition
type PartitionMsg ¶
type PartitionMsg struct {
// contains filtered or unexported fields
}