persistenceutils

package
v1.2.14-prerelease04 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBeginNodeID

func GetBeginNodeID(bi types.HistoryBranch) int64

GetBeginNodeID gets node id from last ancestor

func GetBranchesMaxReferredNodeIDs added in v0.24.0

func GetBranchesMaxReferredNodeIDs(branches []*types.HistoryBranch) map[string]int64

Get the maximum referenced node id of each branch

func PaginateHistory

func PaginateHistory(
	ctx context.Context,
	historyV2Mgr persistence.HistoryManager,
	byBatch bool,
	branchToken []byte,
	firstEventID int64,
	nextEventID int64,
	tokenIn []byte,
	pageSize int,
	shardID *int,
	domainID string,
	domainCache cache.DomainCache,
) ([]*types.HistoryEvent, []*types.History, []byte, int, error)

PaginateHistory return paged history

func ReadFullPageV2Events

func ReadFullPageV2Events(
	ctx context.Context,
	historyV2Mgr persistence.HistoryManager,
	req *persistence.ReadHistoryBranchRequest,
) ([]*types.HistoryEvent, int, []byte, error)

ReadFullPageV2Events reads a full page of history events from HistoryManager. Due to storage format of V2 History it is not guaranteed that pageSize amount of data is returned. Function returns the list of history events, the size of data read, the next page token, and an error if present.

func ReadFullPageV2EventsByBatch

func ReadFullPageV2EventsByBatch(
	ctx context.Context,
	historyV2Mgr persistence.HistoryManager,
	req *persistence.ReadHistoryBranchRequest,
) ([]*types.History, int, []byte, error)

ReadFullPageV2EventsByBatch reads a full page of history events by batch from HistoryManager. Due to storage format of V2 History it is not guaranteed that pageSize amount of data is returned. Function returns the list of history batches, the size of data read, the next page token, and an error if present.

Types

This section is empty.

Jump to

Keyboard shortcuts

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