materializer

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service materializes current state from WAL entries

func NewService

func NewService(walService *wal.Service) *Service

NewService creates a new materializer service

func (*Service) ApplyEntry

func (s *Service) ApplyEntry(state map[string]bson.M, entry *wal.Entry) error

ApplyEntry applies a WAL entry to the current state Exported for use by time travel service

func (*Service) MaterializeBranch

func (s *Service) MaterializeBranch(branch *wal.Branch) (map[string]map[string]bson.M, error)

MaterializeBranch builds the complete state of all collections in a branch

func (*Service) MaterializeCollection

func (s *Service) MaterializeCollection(branch *wal.Branch, collection string) (map[string]bson.M, error)

MaterializeCollection builds the current state of a collection for a branch

func (*Service) MaterializeDocument

func (s *Service) MaterializeDocument(branch *wal.Branch, collection, documentID string) (bson.M, error)

MaterializeDocument gets the current state of a specific document

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL