persistence

package
v1.32.1-x.4 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 56 Imported by: 0

Documentation

Overview

Package persistence is a generated GoMock package.

Package persistence is a generated GoMock package.

Package persistence is a generated GoMock package.

Index

Constants

View Source
const (
	ErrMsgSerializeTaskToEnqueue = "failed to serialize history task for task queue"
	// ErrMsgDeserializeRawHistoryTask is returned when the raw task cannot be deserialized from the task queue. This error
	// is returned when this whole top-level proto cannot be deserialized.
	//  Raw Task (a proto): <-- when this cannot be deserialized
	//	- ShardID
	//	- Blob (a serialized task)
	ErrMsgDeserializeRawHistoryTask = "failed to deserialize raw history task from task queue"
	// ErrMsgDeserializeHistoryTask is returned when the history task cannot be deserialized from the task queue. This
	// error is returned when the blob inside the raw task cannot be deserialized.
	//  Raw Task (a proto):
	//	- ShardID
	//	- Blob (a serialized task) <-- when this cannot be deserialized
	ErrMsgDeserializeHistoryTask = "failed to deserialize history task blob"
	// ErrMsgFailedToParseCategoryID is returned when category id cannot be parsed as an integer value.
	ErrMsgFailedToParseCategoryID = "failed to parse category id from queue name"
)
View Source
const (
	WorkflowIDTagName = "workflow_id"
	RunIDTagName      = "run_id"
	ErrorTagName      = "error"
)
View Source
const (
	EmptyQueueMessageID = int64(-1)
	MaxQueueMessageID   = math.MaxInt64
)
View Source
const (
	RateLimitDefaultToken = 1
	CallerSegmentMissing  = -1
)
View Source
const (
	// InitialFailoverNotificationVersion is the initial failover version for a namespace
	InitialFailoverNotificationVersion int64 = 0
)
View Source
const SubqueueZero = 0

Subqueue zero corresponds to "the queue" before migrating metadata to subqueues. For SQL: metadata operations apply to subqueue zero only, while tasks are stored in multiple subqueues. For Cassandra: subqueues are represented in the row type.

View Source
const UnknownNumRowsAffected = -1

UnknownNumRowsAffected is returned when the number of rows that an API affected cannot be determined

Variables

View Source
var (
	// ErrInvalidMembershipExpiry is used when upserting new cluster membership with an invalid duration
	ErrInvalidMembershipExpiry = errors.New("membershipExpiry duration should be atleast 1 second")

	// ErrIncompleteMembershipUpsert is used when upserting new cluster membership with missing fields
	ErrIncompleteMembershipUpsert = errors.New("membership upserts require all fields")
)
View Source
var (
	ErrReadTasksNonPositivePageSize = errors.New("page size to read history tasks must be positive")
	ErrHistoryTaskBlobIsNil         = errors.New("history task from queue has nil blob")
	ErrEnqueueTaskRequestTaskIsNil  = errors.New("enqueue task request task is nil")
	ErrQueueAlreadyExists           = errors.New("queue already exists")
	ErrShardIDInvalid               = errors.New("shard ID must be greater than 0")
	ErrInvalidQueueName             = errors.New("invalid queue name, expected 4 fields")
)
View Source
var (
	ErrNexusTableVersionConflict          = serviceerror.NewFailedPrecondition("nexus endpoints table version mismatch")
	ErrNexusEndpointVersionConflict       = serviceerror.NewFailedPrecondition("nexus endpoint version mismatch")
	ErrNegativeListNexusEndpointsPageSize = &InvalidPersistenceRequestError{
		Msg: "received negative page size for listing Nexus endpoints",
	}
)
View Source
var (
	// ErrPersistenceSystemLimitExceeded is the error indicating QPS limit reached.
	ErrPersistenceSystemLimitExceeded = &serviceerror.ResourceExhausted{
		Cause:   enumspb.RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_LIMIT,
		Scope:   enumspb.RESOURCE_EXHAUSTED_SCOPE_SYSTEM,
		Message: "System Persistence Max QPS Reached.",
	}
	ErrPersistenceNamespaceLimitExceeded = &serviceerror.ResourceExhausted{
		Cause:   enumspb.RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_LIMIT,
		Scope:   enumspb.RESOURCE_EXHAUSTED_SCOPE_NAMESPACE,
		Message: "Namespace Persistence Max QPS Reached.",
	}
	ErrPersistenceNamespaceShardLimitExceeded = &serviceerror.ResourceExhausted{
		Cause:   enumspb.RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_LIMIT,
		Scope:   enumspb.RESOURCE_EXHAUSTED_SCOPE_NAMESPACE,
		Message: "Namespace Per-Shard Persistence Max QPS Reached.",
	}
)
View Source
var (
	ErrInvalidReadQueueMessagesNextPageToken = &InvalidPersistenceRequestError{
		Msg: "invalid next-page token for reading queue messages",
	}
	ErrInvalidListQueuesNextPageToken = &InvalidPersistenceRequestError{
		Msg: "invalid next-page token for listing queues",
	}
	ErrNonPositiveReadQueueMessagesPageSize = &InvalidPersistenceRequestError{
		Msg: "non-positive page size for reading queue messages",
	}
	ErrInvalidQueueRangeDeleteMaxMessageID = &InvalidPersistenceRequestError{
		Msg: "max message id for queue range delete is invalid",
	}
	ErrNonPositiveListQueuesPageSize = &InvalidPersistenceRequestError{
		Msg: "non-positive page size for listing queues",
	}
	ErrNegativeListQueuesOffset = &InvalidPersistenceRequestError{
		Msg: "negative offset for listing queues",
	}
)
View Source
var ErrWatchNotSupported = errors.New("watch not supported")

Functions

func BuildHistoryGarbageCleanupInfo

func BuildHistoryGarbageCleanupInfo(namespaceID, workflowID, runID string) string

BuildHistoryGarbageCleanupInfo combine the workflow identity information into a string

func ConstructHistoryTaskAPI

func ConstructHistoryTaskAPI(
	baseAPI string,
	taskCategory tasks.Category,
) string

TODO: change the value returned so it can also be used by persistence metrics client. For now, it's only used by rate limit client, and we don't really care about the actual value returned, as long as they are different from each task category.

func CopyBaseWorkflowInfo

func CopyBaseWorkflowInfo(
	baseWorkflowInfo *workflowspb.BaseExecutionInfo,
) *workflowspb.BaseExecutionInfo

func EmitDataLossMetric

func EmitDataLossMetric(
	handler metrics.Handler,
	namespaceName, workflowID, runID, source string,
	err error,
)

EmitDataLossMetric emits a data loss metric for DataLoss errors

func GetBeginNodeID

func GetBeginNodeID(bi *persistencespb.HistoryBranch) int64

GetBeginNodeID gets node id from last ancestor

func GetHistoryTaskQueueCategoryID

func GetHistoryTaskQueueCategoryID(queueName string) (int, error)

func GetHistoryTaskQueueName

func GetHistoryTaskQueueName(
	categoryID int,
	sourceCluster string,
	targetCluster string,
) string

func GetMinMessageIDToReadForQueueV2

func GetMinMessageIDToReadForQueueV2(
	queueType QueueV2Type,
	queueName string,
	nextPageToken []byte,
	queue *persistencespb.Queue,
) (int64, error)

func GetNextPageTokenForListQueues

func GetNextPageTokenForListQueues(queueNumber int64) []byte

func GetNextPageTokenForReadMessages

func GetNextPageTokenForReadMessages(result []QueueV2Message) []byte

func GetOffsetForListQueues

func GetOffsetForListQueues(
	nextPageToken []byte,
) (int64, error)

func GetOrUseDefaultActiveCluster

func GetOrUseDefaultActiveCluster(currentClusterName string, activeClusterName string) string

GetOrUseDefaultActiveCluster return the current cluster name or use the input if valid

func GetOrUseDefaultClusters

func GetOrUseDefaultClusters(currentClusterName string, clusters []string) []string

GetOrUseDefaultClusters return the current cluster or use the input if valid

func GetPartitionForQueueV2

func GetPartitionForQueueV2(
	queueType QueueV2Type,
	queueName string,
	queue *persistencespb.Queue,
) (*persistencespb.QueuePartition, error)

func GetXDCCacheValue

func GetXDCCacheValue(
	executionInfo *persistencespb.WorkflowExecutionInfo,
	eventID int64,
	version int64,
) ([]*historyspb.VersionHistoryItem, []byte, *workflowspb.BaseExecutionInfo, error)

func IsConflictErr

func IsConflictErr(err error) bool

func LoadAndSplitQuery

func LoadAndSplitQuery(
	filePaths []string,
) ([]string, error)

LoadAndSplitQuery loads and split cql / sql query into one statement per string. Comments are removed from the query.

func LoadAndSplitQueryFromReaders

func LoadAndSplitQueryFromReaders(
	readers []io.Reader,
) ([]string, error)

LoadAndSplitQueryFromReaders loads and split cql / sql query into one statement per string. Comments are removed from the query.

func NewDataBlob

func NewDataBlob(data []byte, encodingTypeStr string) *commonpb.DataBlob

NewDataBlob returns a new DataBlob. TODO: return an UnknowEncodingType error with the actual type string when encodingTypeStr is invalid

func NewHealthSignalAggregator

func NewHealthSignalAggregator(
	aggregationEnabled bool,
	percentilesEnabled dynamicconfig.BoolPropertyFn,
	windowSize time.Duration,
	maxBufferSize int,
	metricsHandler metrics.Handler,
	logger log.Logger,
	latencyWindowSize time.Duration,
	latencyWindowCount int,
) *healthSignalAggregatorImpl

func NewQueueNotFoundError

func NewQueueNotFoundError(queueType QueueV2Type, queueName string) error

func OperationPossiblySucceeded

func OperationPossiblySucceeded(err error) bool

func ReadFullPageEvents

func ReadFullPageEvents(
	ctx context.Context,
	executionMgr ExecutionManager,
	req *ReadHistoryBranchRequest,
) ([]*historypb.HistoryEvent, int, []byte, error)

ReadFullPageEvents reads a full page of history events from ExecutionManager. 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 ReadFullPageEventsByBatch

func ReadFullPageEventsByBatch(
	ctx context.Context,
	executionMgr ExecutionManager,
	req *ReadHistoryBranchRequest,
) ([]*historypb.History, int, []byte, error)

ReadFullPageEventsByBatch reads a full page of history events by batch from ExecutionManager. 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.

func ReadFullPageEventsReverse

func ReadFullPageEventsReverse(
	ctx context.Context,
	executionMgr ExecutionManager,
	req *ReadHistoryBranchReverseRequest,
) ([]*historypb.HistoryEvent, int, []byte, error)

ReadFullPageEventsReverse reads a full page of history events from ExecutionManager in reverse orcer. 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 ReadFullPageRawEvents

func ReadFullPageRawEvents(
	ctx context.Context,
	executionMgr ExecutionManager,
	req *ReadHistoryBranchRequest,
) ([]*commonpb.DataBlob, int, []byte, error)

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

func SplitHistoryGarbageCleanupInfo

func SplitHistoryGarbageCleanupInfo(info string) (namespaceID, workflowID, runID string, err error)

SplitHistoryGarbageCleanupInfo returns workflow identity information

func UnixMilliseconds

func UnixMilliseconds(t time.Time) int64

UnixMilliseconds returns t as a Unix time, the number of milliseconds elapsed since January 1, 1970 UTC. It should be used for all CQL timestamp.

func ValidateBatch

func ValidateBatch(
	batch []*historyspb.StrippedHistoryEvent,
	branchToken []byte,
	lastEventID int64,
	logger log.Logger,
) error

func ValidateConflictResolveWorkflowModeState

func ValidateConflictResolveWorkflowModeState(
	mode ConflictResolveWorkflowMode,
	resetWorkflowSnapshot WorkflowSnapshot,
	newWorkflowSnapshot *WorkflowSnapshot,
	currentWorkflowMutation *WorkflowMutation,
) error

ValidateConflictResolveWorkflowModeState validate workflow conflict resolve mode & workflow state

func ValidateCreateWorkflowModeState

func ValidateCreateWorkflowModeState(
	mode CreateWorkflowMode,
	newWorkflowSnapshot WorkflowSnapshot,
) error

ValidateCreateWorkflowModeState validate workflow creation mode & workflow state

func ValidateCreateWorkflowStateStatus

func ValidateCreateWorkflowStateStatus(
	state enumsspb.WorkflowExecutionState,
	status enumspb.WorkflowExecutionStatus,
) error

ValidateCreateWorkflowStateStatus validate workflow state and close status

func ValidateUpdateWorkflowModeState

func ValidateUpdateWorkflowModeState(
	mode UpdateWorkflowMode,
	currentWorkflowMutation WorkflowMutation,
	newWorkflowSnapshot *WorkflowSnapshot,
) error

ValidateUpdateWorkflowModeState validate workflow update mode & workflow state

func ValidateUpdateWorkflowStateStatus

func ValidateUpdateWorkflowStateStatus(
	state enumsspb.WorkflowExecutionState,
	status enumspb.WorkflowExecutionStatus,
) error

ValidateUpdateWorkflowStateStatus validate workflow state and status

Types

type AddHistoryTasksRequest

type AddHistoryTasksRequest struct {
	ShardID int32
	RangeID int64

	NamespaceID string
	WorkflowID  string
	ArchetypeID chasm.ArchetypeID

	Tasks map[tasks.Category][]tasks.Task
}

AddHistoryTasksRequest is used to write new tasks

type AppendHistoryNodesRequest

type AppendHistoryNodesRequest struct {
	// The shard to get history node data
	ShardID int32
	// true if this is the first append request to the branch
	IsNewBranch bool
	// the info for clean up data in background
	Info string
	// The branch to be appended
	BranchToken []byte
	// The batch of events to be appended. The first eventID will become the nodeID of this batch
	Events []*historypb.HistoryEvent
	// TransactionID for events before these events. For events chaining
	PrevTransactionID int64
	// requested TransactionID for this write operation. For the same eventID, the node with larger TransactionID always wins
	TransactionID int64
}

AppendHistoryNodesRequest is used to append a batch of history nodes

type AppendHistoryNodesResponse

type AppendHistoryNodesResponse struct {
	// the size of the event data that has been appended
	Size int
}

AppendHistoryNodesResponse is a response to AppendHistoryNodesRequest

type AppendHistoryTimeoutError

type AppendHistoryTimeoutError struct {
	Msg string
}

AppendHistoryTimeoutError represents a failed insert to history tree / node request

func (*AppendHistoryTimeoutError) Error

func (e *AppendHistoryTimeoutError) Error() string

type AppendRawHistoryNodesRequest

type AppendRawHistoryNodesRequest struct {
	// The shard to get history node data
	ShardID int32
	// true if this is the first append request to the branch
	IsNewBranch bool
	// the info for clean up data in background
	Info string
	// The branch to be appended
	BranchToken []byte
	// The batch of events to be appended. The first eventID will become the nodeID of this batch
	History *commonpb.DataBlob
	// TransactionID for events before these events. For events chaining
	PrevTransactionID int64
	// requested TransactionID for this write operation. For the same eventID, the node with larger TransactionID always wins
	TransactionID int64
	// NodeID is the first event id.
	NodeID int64
}

AppendRawHistoryNodesRequest is used to append a batch of raw history nodes

type Archetype

type Archetype = chasm.Archetype

Archetype is a type alias for chasm.Archetype to avoid circular dependency.

type AssertShardOwnershipRequest

type AssertShardOwnershipRequest struct {
	ShardID int32
	RangeID int64
}

AssertShardOwnershipRequest is used to assert shard ownership

type Closeable

type Closeable interface {
	Close()
}

Closeable is an interface for any entity that supports a close operation to release resources TODO: allow this method to return errors

type ClusterMember

type ClusterMember struct {
	Role          ServiceType
	HostID        []byte
	RPCAddress    net.IP
	RPCPort       uint16
	SessionStart  time.Time
	LastHeartbeat time.Time
	RecordExpiry  time.Time
}

ClusterMember is used as a response to GetClusterMembers

type ClusterMetadataManager

type ClusterMetadataManager interface {
	Closeable
	GetName() string
	GetClusterMembers(ctx context.Context, request *GetClusterMembersRequest) (*GetClusterMembersResponse, error)
	UpsertClusterMembership(ctx context.Context, request *UpsertClusterMembershipRequest) error
	PruneClusterMembership(ctx context.Context, request *PruneClusterMembershipRequest) error
	ListClusterMetadata(ctx context.Context, request *ListClusterMetadataRequest) (*ListClusterMetadataResponse, error)
	GetCurrentClusterMetadata(ctx context.Context) (*GetClusterMetadataResponse, error)
	GetClusterMetadata(ctx context.Context, request *GetClusterMetadataRequest) (*GetClusterMetadataResponse, error)
	SaveClusterMetadata(ctx context.Context, request *SaveClusterMetadataRequest) (bool, error)
	DeleteClusterMetadata(ctx context.Context, request *DeleteClusterMetadataRequest) error
}

ClusterMetadataManager is used to manage cluster-wide metadata and configuration

func NewClusterMetadataManagerImpl

func NewClusterMetadataManagerImpl(
	persistence ClusterMetadataStore,
	serializer serialization.Serializer,
	currentClusterName string,
	logger log.Logger,
) ClusterMetadataManager

NewClusterMetadataManagerImpl returns new ClusterMetadataManager

func NewClusterMetadataPersistenceMetricsClient

func NewClusterMetadataPersistenceMetricsClient(persistence ClusterMetadataManager, metricsHandler metrics.Handler, healthSignals HealthSignalAggregator, logger log.Logger, enableDataLossMetrics dynamicconfig.BoolPropertyFn) ClusterMetadataManager

NewClusterMetadataPersistenceMetricsClient creates a ClusterMetadataManager client to manage cluster metadata

func NewClusterMetadataPersistenceRateLimitedClient

func NewClusterMetadataPersistenceRateLimitedClient(
	persistence ClusterMetadataManager,
	systemRateLimiter quotas.RequestRateLimiter,
	namespaceRateLimiter quotas.RequestRateLimiter,
	shardRateLimiter quotas.RequestRateLimiter,
	logger log.Logger,
) ClusterMetadataManager

NewClusterMetadataPersistenceRateLimitedClient creates a ClusterMetadataManager client to manage cluster metadata

func NewClusterMetadataPersistenceRetryableClient

func NewClusterMetadataPersistenceRetryableClient(
	persistence ClusterMetadataManager,
	policy backoff.RetryPolicy,
	isRetryable backoff.IsRetryable,
) ClusterMetadataManager

NewClusterMetadataPersistenceRetryableClient creates a ClusterMetadataManager client to manage cluster metadata

type ClusterMetadataStore

type ClusterMetadataStore interface {
	Closeable
	GetName() string
	ListClusterMetadata(ctx context.Context, request *InternalListClusterMetadataRequest) (*InternalListClusterMetadataResponse, error)
	GetClusterMetadata(ctx context.Context, request *InternalGetClusterMetadataRequest) (*InternalGetClusterMetadataResponse, error)
	SaveClusterMetadata(ctx context.Context, request *InternalSaveClusterMetadataRequest) (bool, error)
	DeleteClusterMetadata(ctx context.Context, request *InternalDeleteClusterMetadataRequest) error
	// Membership APIs
	GetClusterMembers(ctx context.Context, request *GetClusterMembersRequest) (*GetClusterMembersResponse, error)
	UpsertClusterMembership(ctx context.Context, request *UpsertClusterMembershipRequest) error
	PruneClusterMembership(ctx context.Context, request *PruneClusterMembershipRequest) error
}

ClusterMetadataStore is a lower level of ClusterMetadataManager. There is no Internal constructs needed to abstract away at the interface level currently,

so we can reimplement the ClusterMetadataManager and leave this as a placeholder.

type CompleteForkBranchRequest

type CompleteForkBranchRequest struct {
	// the new branch returned from ForkHistoryBranchRequest
	BranchToken []byte
	// true means the fork is success, will update the flag, otherwise will delete the new branch
	Success bool
	// The shard to update history branch data
	ShardID *int
}

CompleteForkBranchRequest is used to complete forking

type CompleteHistoryTaskRequest

type CompleteHistoryTaskRequest struct {
	ShardID      int32
	TaskCategory tasks.Category
	TaskKey      tasks.Key

	// BestEffort indicates that this request is a suggestion. System may choose to ignore it without error.
	BestEffort bool
}

CompleteHistoryTaskRequest delete one history task

type CompleteTasksLessThanRequest

type CompleteTasksLessThanRequest struct {
	NamespaceID        string
	TaskQueueName      string
	TaskType           enumspb.TaskQueueType
	ExclusiveMaxPass   int64 // If set, delete tasks less than <ExclusiveMaxPass, ExclusiveMaxTaskID>
	ExclusiveMaxTaskID int64 // Tasks less than this ID will be completed
	Subqueue           int
	Limit              int // Limit on the max number of tasks that can be completed. Required param
	// If set, only delete if the task queue's range id matches this value, otherwise return
	// ConditionFailedError. Only supported for fair (v2) task queues.
	ConditionRangeID int64
}

CompleteTasksLessThanRequest contains the request params needed to invoke CompleteTasksLessThan API

type ConditionFailedError

type ConditionFailedError struct {
	Msg string
}

ConditionFailedError represents a failed conditional update for execution record

func (*ConditionFailedError) Error

func (e *ConditionFailedError) Error() string

type ConflictResolveWorkflowExecutionRequest

type ConflictResolveWorkflowExecutionRequest struct {
	ShardID int32
	RangeID int64

	Mode ConflictResolveWorkflowMode

	ArchetypeID chasm.ArchetypeID

	// workflow to be resetted
	ResetWorkflowSnapshot WorkflowSnapshot
	ResetWorkflowEvents   []*WorkflowEvents

	// maybe new workflow
	NewWorkflowSnapshot *WorkflowSnapshot
	NewWorkflowEvents   []*WorkflowEvents

	// current workflow
	CurrentWorkflowMutation *WorkflowMutation
	CurrentWorkflowEvents   []*WorkflowEvents
}

ConflictResolveWorkflowExecutionRequest is used to reset workflow execution state for a single run

type ConflictResolveWorkflowExecutionResponse

type ConflictResolveWorkflowExecutionResponse struct {
	ResetMutableStateStats   MutableStateStatistics
	NewMutableStateStats     *MutableStateStatistics
	CurrentMutableStateStats *MutableStateStatistics
}

type ConflictResolveWorkflowMode

type ConflictResolveWorkflowMode int

ConflictResolveWorkflowMode conflict resolve mode

const (
	// ConflictResolveWorkflowModeUpdateCurrent conflict resolve workflow, including current record
	// NOTE: update on current record is a condition update
	ConflictResolveWorkflowModeUpdateCurrent ConflictResolveWorkflowMode = iota
	// ConflictResolveWorkflowModeBypassCurrent conflict resolve workflow, without current record
	// NOTE: current record CANNOT point to the workflow to be updated
	ConflictResolveWorkflowModeBypassCurrent
)

Conflict Resolve Workflow Mode

type CountTaskQueuesByBuildIdRequest

type CountTaskQueuesByBuildIdRequest struct {
	NamespaceID string
	BuildID     string
}

type CreateNamespaceRequest

type CreateNamespaceRequest struct {
	Namespace         *persistencespb.NamespaceDetail
	IsGlobalNamespace bool
}

CreateNamespaceRequest is used to create the namespace

type CreateNamespaceResponse

type CreateNamespaceResponse struct {
	ID string
}

CreateNamespaceResponse is the response for CreateNamespace

type CreateOrUpdateNexusEndpointRequest

type CreateOrUpdateNexusEndpointRequest struct {
	LastKnownTableVersion int64
	Entry                 *persistencespb.NexusEndpointEntry
}

type CreateOrUpdateNexusEndpointResponse

type CreateOrUpdateNexusEndpointResponse struct {
	Version int64
}

type CreateQueueRequest

type CreateQueueRequest struct {
	QueueKey QueueKey
}

type CreateQueueResponse

type CreateQueueResponse struct {
}

type CreateTaskQueueRequest

type CreateTaskQueueRequest struct {
	RangeID       int64
	TaskQueueInfo *persistencespb.TaskQueueInfo
}

CreateTaskQueueRequest create a new task queue

type CreateTaskQueueResponse

type CreateTaskQueueResponse struct {
}

CreateTaskQueueResponse is the response to CreateTaskQueue

type CreateTasksRequest

type CreateTasksRequest struct {
	TaskQueueInfo *PersistedTaskQueueInfo
	Tasks         []*persistencespb.AllocatedTaskInfo
	// If Subqueues is present, it should be the same size as Tasks and hold the subqueue
	// indexes that each task should be added to.
	Subqueues []int
	// UpdateMetadata controls whether the task queue metadata should be written
	// along with the tasks. When false, only the range ID check is performed
	// (for write fencing) without rewriting the metadata blob.
	UpdateMetadata bool
}

CreateTasksRequest is used to create a new task for a workflow execution

type CreateTasksResponse

type CreateTasksResponse struct {
	UpdatedMetadata bool
}

CreateTasksResponse is the response to CreateTasksRequest

type CreateWorkflowExecutionRequest

type CreateWorkflowExecutionRequest struct {
	ShardID int32
	RangeID int64

	Mode CreateWorkflowMode

	PreviousRunID            string
	PreviousLastWriteVersion int64

	ArchetypeID chasm.ArchetypeID

	NewWorkflowSnapshot WorkflowSnapshot
	NewWorkflowEvents   []*WorkflowEvents
}

CreateWorkflowExecutionRequest is used to write a new workflow execution

type CreateWorkflowExecutionResponse

type CreateWorkflowExecutionResponse struct {
	NewMutableStateStats MutableStateStatistics
}

CreateWorkflowExecutionResponse is the response to CreateWorkflowExecutionRequest

type CreateWorkflowMode

type CreateWorkflowMode int

CreateWorkflowMode workflow creation mode

const (
	// CreateWorkflowModeBrandNew fail if current record exists
	// Only applicable for CreateWorkflowExecution
	CreateWorkflowModeBrandNew CreateWorkflowMode = iota
	// CreateWorkflowModeUpdateCurrent update current record only if workflow is closed
	// Only applicable for CreateWorkflowExecution
	CreateWorkflowModeUpdateCurrent
	// CreateWorkflowModeBypassCurrent do not update current record since workflow is in zombie state
	// applicable for CreateWorkflowExecution, UpdateWorkflowExecution
	CreateWorkflowModeBypassCurrent
)

Create Workflow Execution Mode

type CurrentWorkflowConditionFailedError

type CurrentWorkflowConditionFailedError struct {
	Msg string
	// RequestIDs contains all request IDs associated with the workflow execution, ie., contain the
	// request ID that started the workflow execution as well as the request IDs that were attached
	// to the workflow execution when it was running.
	RequestIDs map[string]*persistencespb.RequestIDInfo
	RunID      string
	// FirstExecutionRunID is the run ID of the first execution in the continue-as-new chain.
	// May be empty on records written before this field was added to WorkflowExecutionState;
	// callers must not assume RunID in that case.
	FirstExecutionRunID string
	State               enumsspb.WorkflowExecutionState
	Status              enumspb.WorkflowExecutionStatus
	LastWriteVersion    int64
	StartTime           *time.Time
}

CurrentWorkflowConditionFailedError represents a failed conditional update for current workflow record

func (*CurrentWorkflowConditionFailedError) Error

type DLQMetricsEmitter

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

DLQMetricsEmitter emits the number of messages in DLQ in each task category. This only has to be emitted from one history service instance. For this, DLQMetricsEmitter will only emit metrics if the history service it currently run hosts shard 1.

func NewDLQMetricsEmitter

func NewDLQMetricsEmitter(
	metricsHandler metrics.Handler,
	logger log.Logger,
	manager HistoryTaskQueueManager,
	historyServiceResolver membership.ServiceResolver,
	hostInfoProvider membership.HostInfoProvider,
	taskCategoryRegistry tasks.TaskCategoryRegistry,
) *DLQMetricsEmitter

func (*DLQMetricsEmitter) Start

func (s *DLQMetricsEmitter) Start()

func (*DLQMetricsEmitter) Stop

func (s *DLQMetricsEmitter) Stop()

type DataStoreFactory

type DataStoreFactory interface {
	// Close closes the factory
	Close()
	// NewTaskStore returns a new task store
	NewTaskStore() (TaskStore, error)
	// NewFairTaskStore returns a new task store with fairness enabled
	NewFairTaskStore() (TaskStore, error)
	// NewShardStore returns a new shard store
	NewShardStore() (ShardStore, error)
	// NewMetadataStore returns a new metadata store
	NewMetadataStore() (MetadataStore, error)
	// NewExecutionStore returns a new execution store
	NewExecutionStore() (ExecutionStore, error)
	NewQueue(queueType QueueType) (Queue, error)
	NewQueueV2() (QueueV2, error)
	// NewClusterMetadataStore returns a new metadata store
	NewClusterMetadataStore() (ClusterMetadataStore, error)
	// NewNexusEndpointStore returns a new nexus service store
	NewNexusEndpointStore() (NexusEndpointStore, error)
}

DataStoreFactory is a low level interface to be implemented by a datastore Examples of datastores are cassandra, mysql etc

type DeleteClusterMetadataRequest

type DeleteClusterMetadataRequest struct {
	ClusterName string
}

DeleteClusterMetadataRequest is the request to DeleteClusterMetadata

type DeleteCurrentWorkflowExecutionRequest

type DeleteCurrentWorkflowExecutionRequest struct {
	ShardID     int32
	NamespaceID string
	WorkflowID  string
	RunID       string
	ArchetypeID chasm.ArchetypeID
}

DeleteCurrentWorkflowExecutionRequest is used to delete the current workflow execution

type DeleteHistoryBranchRequest

type DeleteHistoryBranchRequest struct {
	// The shard to delete history branch data
	ShardID int32
	// branch to be deleted
	BranchToken []byte
}

DeleteHistoryBranchRequest is used to remove a history branch

type DeleteNamespaceByNameRequest

type DeleteNamespaceByNameRequest struct {
	Name string
}

DeleteNamespaceByNameRequest is used to delete namespace entry from namespaces_by_name table

type DeleteNamespaceRequest

type DeleteNamespaceRequest struct {
	ID string
}

DeleteNamespaceRequest is used to delete namespace entry from namespaces table

type DeleteNexusEndpointRequest

type DeleteNexusEndpointRequest struct {
	LastKnownTableVersion int64
	ID                    string
}

type DeleteRange

type DeleteRange struct {
	InclusiveMessageRange
	NewMinMessageID  int64
	MessagesToDelete int64
}

func GetDeleteRange

func GetDeleteRange(request DeleteRequest) (DeleteRange, bool)

GetDeleteRange returns the range of messages to delete, and a boolean indicating whether there is any update to be made: meaning either we should delete messages, update the min message ID, or both.

type DeleteReplicationTaskFromDLQRequest

type DeleteReplicationTaskFromDLQRequest struct {
	CompleteHistoryTaskRequest

	SourceClusterName string
}

DeleteReplicationTaskFromDLQRequest is used to delete replication task from DLQ

type DeleteRequest

type DeleteRequest struct {
	// LastIDToDeleteInclusive represents the maximum message ID that the user wants to delete, inclusive.
	LastIDToDeleteInclusive int64
	// ExistingMessageRange represents an inclusive range of the minimum message ID and the maximum message ID in the queue.
	ExistingMessageRange InclusiveMessageRange
}

type DeleteTaskQueueRequest

type DeleteTaskQueueRequest struct {
	TaskQueue *TaskQueueKey
	RangeID   int64
}

DeleteTaskQueueRequest contains the request params needed to invoke DeleteTaskQueue API

type DeleteTasksRequest

type DeleteTasksRequest struct {
	QueueKey                    QueueKey
	InclusiveMaxMessageMetadata MessageMetadata
}

type DeleteTasksResponse

type DeleteTasksResponse struct {
	MessagesDeleted int64
}

type DeleteWorkflowExecutionRequest

type DeleteWorkflowExecutionRequest struct {
	ShardID     int32
	NamespaceID string
	WorkflowID  string
	RunID       string
	ArchetypeID chasm.ArchetypeID
}

DeleteWorkflowExecutionRequest is used to delete a workflow execution

type EnqueueTaskRequest

type EnqueueTaskRequest struct {
	QueueType     QueueV2Type
	SourceCluster string
	TargetCluster string
	Task          tasks.Task
	// SourceShardID of the task in its original cluster. Note that tasks may move between clusters, so this shard
	// id may not be the same as the shard id of the task in the current cluster.
	SourceShardID int
}

EnqueueTaskRequest does not include a QueueKey because it does not need the QueueKey.Category field, as that can already be inferred from the Task field.

type EnqueueTaskResponse

type EnqueueTaskResponse struct {
	Metadata MessageMetadata
}

type ExecutionManager

type ExecutionManager interface {
	Closeable
	GetName() string
	GetHistoryBranchUtil() HistoryBranchUtil

	CreateWorkflowExecution(ctx context.Context, request *CreateWorkflowExecutionRequest) (*CreateWorkflowExecutionResponse, error)
	UpdateWorkflowExecution(ctx context.Context, request *UpdateWorkflowExecutionRequest) (*UpdateWorkflowExecutionResponse, error)
	ConflictResolveWorkflowExecution(ctx context.Context, request *ConflictResolveWorkflowExecutionRequest) (*ConflictResolveWorkflowExecutionResponse, error)
	DeleteWorkflowExecution(ctx context.Context, request *DeleteWorkflowExecutionRequest) error
	DeleteCurrentWorkflowExecution(ctx context.Context, request *DeleteCurrentWorkflowExecutionRequest) error
	GetCurrentExecution(ctx context.Context, request *GetCurrentExecutionRequest) (*GetCurrentExecutionResponse, error)
	GetWorkflowExecution(ctx context.Context, request *GetWorkflowExecutionRequest) (*GetWorkflowExecutionResponse, error)
	SetWorkflowExecution(ctx context.Context, request *SetWorkflowExecutionRequest) (*SetWorkflowExecutionResponse, error)

	ListConcreteExecutions(ctx context.Context, request *ListConcreteExecutionsRequest) (*ListConcreteExecutionsResponse, error)

	AddHistoryTasks(ctx context.Context, request *AddHistoryTasksRequest) error
	GetHistoryTasks(ctx context.Context, request *GetHistoryTasksRequest) (*GetHistoryTasksResponse, error)
	CompleteHistoryTask(ctx context.Context, request *CompleteHistoryTaskRequest) error
	RangeCompleteHistoryTasks(ctx context.Context, request *RangeCompleteHistoryTasksRequest) error

	PutReplicationTaskToDLQ(ctx context.Context, request *PutReplicationTaskToDLQRequest) error
	GetReplicationTasksFromDLQ(ctx context.Context, request *GetReplicationTasksFromDLQRequest) (*GetHistoryTasksResponse, error)
	DeleteReplicationTaskFromDLQ(ctx context.Context, request *DeleteReplicationTaskFromDLQRequest) error
	RangeDeleteReplicationTaskFromDLQ(ctx context.Context, request *RangeDeleteReplicationTaskFromDLQRequest) error
	IsReplicationDLQEmpty(ctx context.Context, request *GetReplicationTasksFromDLQRequest) (bool, error)

	// AppendHistoryNodes add a node to history node table
	AppendHistoryNodes(ctx context.Context, request *AppendHistoryNodesRequest) (*AppendHistoryNodesResponse, error)
	// AppendRawHistoryNodes add a node of raw histories to history node table
	AppendRawHistoryNodes(ctx context.Context, request *AppendRawHistoryNodesRequest) (*AppendHistoryNodesResponse, error)
	// ReadHistoryBranch returns history node data for a branch
	ReadHistoryBranch(ctx context.Context, request *ReadHistoryBranchRequest) (*ReadHistoryBranchResponse, error)
	// ReadHistoryBranchByBatch returns history node data for a branch ByBatch
	ReadHistoryBranchByBatch(ctx context.Context, request *ReadHistoryBranchRequest) (*ReadHistoryBranchByBatchResponse, error)
	// ReadHistoryBranchReverse returns history node data for a branch
	ReadHistoryBranchReverse(ctx context.Context, request *ReadHistoryBranchReverseRequest) (*ReadHistoryBranchReverseResponse, error)
	// ReadRawHistoryBranch returns history node raw data for a branch ByBatch
	// NOTE: this API should only be used by 3+DC
	ReadRawHistoryBranch(ctx context.Context, request *ReadHistoryBranchRequest) (*ReadRawHistoryBranchResponse, error)
	// ForkHistoryBranch forks a new branch from a old branch
	ForkHistoryBranch(ctx context.Context, request *ForkHistoryBranchRequest) (*ForkHistoryBranchResponse, error)
	// DeleteHistoryBranch removes a branch
	// If this is the last branch to delete, it will also remove the root node
	DeleteHistoryBranch(ctx context.Context, request *DeleteHistoryBranchRequest) error
	// TrimHistoryBranch validate & trim a history branch
	TrimHistoryBranch(ctx context.Context, request *TrimHistoryBranchRequest) (*TrimHistoryBranchResponse, error)
	// GetAllHistoryTreeBranches returns all branches of all trees
	GetAllHistoryTreeBranches(ctx context.Context, request *GetAllHistoryTreeBranchesRequest) (*GetAllHistoryTreeBranchesResponse, error)
}

ExecutionManager is used to manage workflow executions

func NewExecutionManager

func NewExecutionManager(
	persistence ExecutionStore,
	serializer serialization.Serializer,
	eventBlobCache XDCCache,
	logger log.Logger,
	transactionSizeLimit dynamicconfig.IntPropertyFn,
	enableBestEffortDeleteTasksOnWorkflowUpdate dynamicconfig.BoolPropertyFn,
) ExecutionManager

NewExecutionManager returns new ExecutionManager

func NewExecutionPersistenceMetricsClient

func NewExecutionPersistenceMetricsClient(persistence ExecutionManager, metricsHandler metrics.Handler, healthSignals HealthSignalAggregator, logger log.Logger, enableDataLossMetrics dynamicconfig.BoolPropertyFn) ExecutionManager

NewExecutionPersistenceMetricsClient creates a client to manage executions

func NewExecutionPersistenceRateLimitedClient

func NewExecutionPersistenceRateLimitedClient(
	persistence ExecutionManager,
	systemRateLimiter quotas.RequestRateLimiter,
	namespaceRateLimiter quotas.RequestRateLimiter,
	shardRateLimiter quotas.RequestRateLimiter,
	logger log.Logger,
) ExecutionManager

NewExecutionPersistenceRateLimitedClient creates a client to manage executions

func NewExecutionPersistenceRetryableClient

func NewExecutionPersistenceRetryableClient(
	persistence ExecutionManager,
	policy backoff.RetryPolicy,
	isRetryable backoff.IsRetryable,
) ExecutionManager

NewExecutionPersistenceRetryableClient creates a client to manage executions

type ExecutionStore

type ExecutionStore interface {
	Closeable
	GetName() string
	GetHistoryBranchUtil() HistoryBranchUtil

	// The below three APIs are related to serialization/deserialization
	CreateWorkflowExecution(ctx context.Context, request *InternalCreateWorkflowExecutionRequest) (*InternalCreateWorkflowExecutionResponse, error)
	UpdateWorkflowExecution(ctx context.Context, request *InternalUpdateWorkflowExecutionRequest) error
	ConflictResolveWorkflowExecution(ctx context.Context, request *InternalConflictResolveWorkflowExecutionRequest) error

	DeleteWorkflowExecution(ctx context.Context, request *DeleteWorkflowExecutionRequest) error
	DeleteCurrentWorkflowExecution(ctx context.Context, request *DeleteCurrentWorkflowExecutionRequest) error
	GetCurrentExecution(ctx context.Context, request *GetCurrentExecutionRequest) (*InternalGetCurrentExecutionResponse, error)
	GetWorkflowExecution(ctx context.Context, request *GetWorkflowExecutionRequest) (*InternalGetWorkflowExecutionResponse, error)
	SetWorkflowExecution(ctx context.Context, request *InternalSetWorkflowExecutionRequest) error

	// Scan related methods
	ListConcreteExecutions(ctx context.Context, request *ListConcreteExecutionsRequest) (*InternalListConcreteExecutionsResponse, error)

	AddHistoryTasks(ctx context.Context, request *InternalAddHistoryTasksRequest) error
	GetHistoryTasks(ctx context.Context, request *GetHistoryTasksRequest) (*InternalGetHistoryTasksResponse, error)
	CompleteHistoryTask(ctx context.Context, request *CompleteHistoryTaskRequest) error
	RangeCompleteHistoryTasks(ctx context.Context, request *RangeCompleteHistoryTasksRequest) error

	PutReplicationTaskToDLQ(ctx context.Context, request *PutReplicationTaskToDLQRequest) error
	GetReplicationTasksFromDLQ(ctx context.Context, request *GetReplicationTasksFromDLQRequest) (*InternalGetReplicationTasksFromDLQResponse, error)
	DeleteReplicationTaskFromDLQ(ctx context.Context, request *DeleteReplicationTaskFromDLQRequest) error
	RangeDeleteReplicationTaskFromDLQ(ctx context.Context, request *RangeDeleteReplicationTaskFromDLQRequest) error
	IsReplicationDLQEmpty(ctx context.Context, request *GetReplicationTasksFromDLQRequest) (bool, error)

	// AppendHistoryNodes add a node to history node table
	AppendHistoryNodes(ctx context.Context, request *InternalAppendHistoryNodesRequest) error
	// DeleteHistoryNodes delete a node from history node table
	DeleteHistoryNodes(ctx context.Context, request *InternalDeleteHistoryNodesRequest) error
	// ReadHistoryBranch returns history node data for a branch
	ReadHistoryBranch(ctx context.Context, request *InternalReadHistoryBranchRequest) (*InternalReadHistoryBranchResponse, error)
	// ForkHistoryBranch forks a new branch from a old branch
	ForkHistoryBranch(ctx context.Context, request *InternalForkHistoryBranchRequest) error
	// DeleteHistoryBranch removes a branch
	DeleteHistoryBranch(ctx context.Context, request *InternalDeleteHistoryBranchRequest) error
	// GetHistoryTreeContainingBranch returns all branch information of the tree containing the specified branch
	GetHistoryTreeContainingBranch(ctx context.Context, request *InternalGetHistoryTreeContainingBranchRequest) (*InternalGetHistoryTreeContainingBranchResponse, error)
	// GetAllHistoryTreeBranches returns all branches of all trees.
	// Note that branches may be skipped or duplicated across pages if there are branches created or deleted while
	// paginating through results.
	GetAllHistoryTreeBranches(ctx context.Context, request *GetAllHistoryTreeBranchesRequest) (*InternalGetAllHistoryTreeBranchesResponse, error)
}

ExecutionStore is used to manage workflow execution including mutable states / history / tasks.

type FairTaskManager

type FairTaskManager TaskManager

type ForkHistoryBranchRequest

type ForkHistoryBranchRequest struct {
	// The shard to get history branch data
	ShardID int32
	// The namespace performing the fork
	NamespaceID string
	// The base branch to fork from
	ForkBranchToken []byte
	// The nodeID to fork from, the new branch will start from ( inclusive ), the base branch will stop at(exclusive)
	// Application must provide a void forking nodeID, it must be a valid nodeID in that branch. A valid nodeID is the firstEventID of a valid batch of events.
	// And ForkNodeID > 1 because forking from 1 doesn't make any sense.
	ForkNodeID int64
	// the info for clean up data in background
	Info string
	// the new run ID
	NewRunID string
}

ForkHistoryBranchRequest is used to fork a history branch

type ForkHistoryBranchResponse

type ForkHistoryBranchResponse struct {
	// branchToken to represent the new branch
	NewBranchToken []byte
}

ForkHistoryBranchResponse is the response to ForkHistoryBranchRequest

type GetAllHistoryTreeBranchesRequest

type GetAllHistoryTreeBranchesRequest struct {
	// pagination token
	NextPageToken []byte
	// maximum number of branches returned per page
	PageSize int
}

GetAllHistoryTreeBranchesRequest is a request of GetAllHistoryTreeBranches

type GetAllHistoryTreeBranchesResponse

type GetAllHistoryTreeBranchesResponse struct {
	// pagination token
	NextPageToken []byte
	// all branches of all trees
	Branches []HistoryBranchDetail
}

GetAllHistoryTreeBranchesResponse is a response to GetAllHistoryTreeBranches

type GetClusterMembersRequest

type GetClusterMembersRequest struct {
	LastHeartbeatWithin time.Duration
	RPCAddressEquals    net.IP
	HostIDEquals        []byte
	RoleEquals          ServiceType
	SessionStartedAfter time.Time
	NextPageToken       []byte
	PageSize            int
}

GetClusterMembersRequest is the request to GetClusterMembers

type GetClusterMembersResponse

type GetClusterMembersResponse struct {
	ActiveMembers []*ClusterMember
	NextPageToken []byte
}

GetClusterMembersResponse is the response to GetClusterMembers

type GetClusterMetadataRequest

type GetClusterMetadataRequest struct {
	ClusterName string
}

GetClusterMetadataRequest is the request to GetClusterMetadata

type GetClusterMetadataResponse

type GetClusterMetadataResponse struct {
	*persistencespb.ClusterMetadata
	Version int64
}

GetClusterMetadataResponse is the response to GetClusterMetadata

type GetCurrentExecutionRequest

type GetCurrentExecutionRequest struct {
	ShardID     int32
	NamespaceID string
	WorkflowID  string
	ArchetypeID chasm.ArchetypeID
}

GetCurrentExecutionRequest is used to retrieve the current RunId for an execution

type GetCurrentExecutionResponse

type GetCurrentExecutionResponse struct {
	StartRequestID string
	RunID          string
	State          enumsspb.WorkflowExecutionState
	Status         enumspb.WorkflowExecutionStatus
}

GetCurrentExecutionResponse is the response to GetCurrentExecution

type GetHistoryTasksRequest

type GetHistoryTasksRequest struct {
	ShardID             int32
	TaskCategory        tasks.Category
	InclusiveMinTaskKey tasks.Key
	ExclusiveMaxTaskKey tasks.Key
	BatchSize           int
	NextPageToken       []byte
}

GetHistoryTasksRequest is used to get a range of history tasks Either max TaskID or FireTime is required depending on the task category type. Min TaskID or FireTime is optional.

type GetHistoryTasksResponse

type GetHistoryTasksResponse struct {
	Tasks         []tasks.Task
	NextPageToken []byte
}

GetHistoryTasksResponse is the response for GetHistoryTasks

type GetMetadataResponse

type GetMetadataResponse struct {
	NotificationVersion int64
}

GetMetadataResponse is the response for GetMetadata

type GetNamespaceRequest

type GetNamespaceRequest struct {
	ID   string
	Name string
}

GetNamespaceRequest is used to read namespace

type GetNamespaceResponse

type GetNamespaceResponse struct {
	Namespace           *persistencespb.NamespaceDetail
	IsGlobalNamespace   bool
	NotificationVersion int64
}

GetNamespaceResponse is the response for GetNamespace

func ConvertInternalGetNamespaceResponse

func ConvertInternalGetNamespaceResponse(serializer serialization.Serializer, currentClusterName string, d *InternalGetNamespaceResponse) (*GetNamespaceResponse, error)

type GetNexusEndpointRequest

type GetNexusEndpointRequest struct {
	ID string
}

type GetOrCreateShardRequest

type GetOrCreateShardRequest struct {
	ShardID          int32
	InitialShardInfo *persistencespb.ShardInfo // optional, zero value will be used if missing
	LifecycleContext context.Context           // cancelled when shard is unloaded
}

GetOrCreateShardRequest is used to get shard information, or supply initial information to create a shard in executions table

type GetOrCreateShardResponse

type GetOrCreateShardResponse struct {
	ShardInfo *persistencespb.ShardInfo
}

GetOrCreateShardResponse is the response to GetOrCreateShard

type GetReplicationTasksFromDLQRequest

type GetReplicationTasksFromDLQRequest struct {
	GetHistoryTasksRequest

	SourceClusterName string
}

GetReplicationTasksFromDLQRequest is used to get replication tasks from dlq

type GetReplicationTasksRequest

type GetReplicationTasksRequest struct {
	ShardID       int32
	MinTaskID     int64
	MaxTaskID     int64
	BatchSize     int
	NextPageToken []byte
}

GetReplicationTasksRequest is used to read tasks from the replication task queue

type GetTaskQueueRequest

type GetTaskQueueRequest struct {
	NamespaceID string
	TaskQueue   string
	TaskType    enumspb.TaskQueueType
}

GetTaskQueueRequest get the target task queue

type GetTaskQueueResponse

type GetTaskQueueResponse struct {
	RangeID       int64
	TaskQueueInfo *persistencespb.TaskQueueInfo
}

GetTaskQueueResponse is the response to GetTaskQueue

type GetTaskQueueUserDataRequest

type GetTaskQueueUserDataRequest struct {
	NamespaceID string
	TaskQueue   string
}

GetTaskQueueUserDataRequest is the input type for the GetTaskQueueUserData API

type GetTaskQueueUserDataResponse

type GetTaskQueueUserDataResponse struct {
	UserData *persistencespb.VersionedTaskQueueUserData
}

GetTaskQueueUserDataResponse is the output type for the GetTaskQueueUserData API

type GetTaskQueuesByBuildIdRequest

type GetTaskQueuesByBuildIdRequest struct {
	NamespaceID string
	BuildID     string
}

type GetTasksRequest

type GetTasksRequest struct {
	NamespaceID string
	TaskQueue   string
	TaskType    enumspb.TaskQueueType
	// If InclusiveMinPass is set, return tasks greater or equal to <InclusiveMinPass,
	// InclusiveMinTaskID> with no upper bound. InclusiveMinPass must be >= 1 for fair task
	// manager and must be 0 for classic task manager.
	InclusiveMinPass   int64
	InclusiveMinTaskID int64
	ExclusiveMaxTaskID int64
	Subqueue           int
	PageSize           int
	UseLimit           bool // If true, use LIMIT in the query
	NextPageToken      []byte
}

GetTasksRequest is used to retrieve tasks of a task queue

type GetTasksResponse

type GetTasksResponse struct {
	Tasks         []*persistencespb.AllocatedTaskInfo
	NextPageToken []byte
}

GetTasksResponse is the response to GetTasksRequests

type GetWorkflowExecutionRequest

type GetWorkflowExecutionRequest struct {
	ShardID     int32
	NamespaceID string
	WorkflowID  string
	RunID       string
	ArchetypeID chasm.ArchetypeID
}

GetWorkflowExecutionRequest is used to retrieve the info of a workflow execution

type GetWorkflowExecutionResponse

type GetWorkflowExecutionResponse struct {
	State             *persistencespb.WorkflowMutableState
	DBRecordVersion   int64
	MutableStateStats MutableStateStatistics
}

GetWorkflowExecutionResponse is the response to GetWorkflowExecutionRequest

type HealthSignalAggregator

type HealthSignalAggregator interface {
	Record(callerSegment int32, latency time.Duration, err error)
	AverageLatency() float64
	LatencyQuantile(quantile float64) float64
	ErrorRatio() float64
	Start()
	Stop()
}
var NoopHealthSignalAggregator HealthSignalAggregator = newNoopSignalAggregator()

type HistoryBranchDetail

type HistoryBranchDetail struct {
	BranchInfo *persistencespb.HistoryBranch
	ForkTime   *timestamppb.Timestamp
	Info       string
}

HistoryBranchDetail contains detailed information of a branch

type HistoryBranchUtil

type HistoryBranchUtil interface {
	NewHistoryBranch(
		namespaceID string,
		workflowID string,
		runID string,
		treeID string,
		branchID *string,
		ancestors []*persistencespb.HistoryBranchRange,
		runTimeout time.Duration,
		executionTimeout time.Duration,
		retentionDuration time.Duration,
	) ([]byte, error)
	// ParseHistoryBranchInfo parses the history branch for branch information
	ParseHistoryBranchInfo(
		branchToken []byte,
	) (*persistencespb.HistoryBranch, error)
	// UpdateHistoryBranchInfo updates the history branch with branch information
	UpdateHistoryBranchInfo(
		branchToken []byte,
		branchInfo *persistencespb.HistoryBranch,
		runID string,
	) ([]byte, error)
}

type HistoryBranchUtilImpl

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

func NewHistoryBranchUtil

func NewHistoryBranchUtil(serializer serialization.Serializer) *HistoryBranchUtilImpl

func (*HistoryBranchUtilImpl) NewHistoryBranch

func (u *HistoryBranchUtilImpl) NewHistoryBranch(
	_ string,
	_ string,
	_ string,
	treeID string,
	branchID *string,
	ancestors []*persistencespb.HistoryBranchRange,
	_ time.Duration,
	_ time.Duration,
	_ time.Duration,
) ([]byte, error)

func (*HistoryBranchUtilImpl) ParseHistoryBranchInfo

func (u *HistoryBranchUtilImpl) ParseHistoryBranchInfo(
	branchToken []byte,
) (*persistencespb.HistoryBranch, error)

func (*HistoryBranchUtilImpl) UpdateHistoryBranchInfo

func (u *HistoryBranchUtilImpl) UpdateHistoryBranchInfo(
	branchToken []byte,
	branchInfo *persistencespb.HistoryBranch,
	runID string,
) ([]byte, error)

type HistoryStatistics

type HistoryStatistics struct {
	SizeDiff  int
	CountDiff int
}

type HistoryTask

type HistoryTask struct {
	MessageMetadata MessageMetadata
	Task            tasks.Task
}

type HistoryTaskQueueManager

type HistoryTaskQueueManager interface {
	Closeable
	EnqueueTask(ctx context.Context, request *EnqueueTaskRequest) (*EnqueueTaskResponse, error)
	ReadRawTasks(
		ctx context.Context,
		request *ReadRawTasksRequest,
	) (*ReadRawTasksResponse, error)
	ReadTasks(ctx context.Context, request *ReadTasksRequest) (*ReadTasksResponse, error)
	// CreateQueue must return an ErrQueueAlreadyExists if the queue already exists.
	CreateQueue(ctx context.Context, request *CreateQueueRequest) (*CreateQueueResponse, error)
	DeleteTasks(ctx context.Context, request *DeleteTasksRequest) (*DeleteTasksResponse, error)
	ListQueues(ctx context.Context, request *ListQueuesRequest) (*ListQueuesResponse, error)
}

HistoryTaskQueueManager is responsible for managing a queue of internal history tasks. This is called a history task queue manager, but the actual history task queues are not managed by this object. Instead, this object is responsible for managing a generic queue of history tasks (which is what the history task DLQ is).

type HistoryTaskQueueManagerImpl

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

func NewHistoryTaskQueueManager

func NewHistoryTaskQueueManager(
	queue QueueV2,
	serializer serialization.Serializer,
) *HistoryTaskQueueManagerImpl

func (HistoryTaskQueueManagerImpl) Close

func (m HistoryTaskQueueManagerImpl) Close()

func (*HistoryTaskQueueManagerImpl) CreateQueue

func (*HistoryTaskQueueManagerImpl) DeleteTasks

func (*HistoryTaskQueueManagerImpl) EnqueueTask

func (HistoryTaskQueueManagerImpl) ListQueues

func (*HistoryTaskQueueManagerImpl) ReadRawTasks

ReadRawTasks returns a page of "raw" tasks from the queue. Here's a quick disambiguation of the different types of tasks:

func (*HistoryTaskQueueManagerImpl) ReadTasks

ReadTasks is a convenience method on top of ReadRawTasks that deserializes the tasks into the tasks.Task type.

type InclusiveMessageRange

type InclusiveMessageRange struct {
	MinMessageID int64
	MaxMessageID int64
}

type InternalAddHistoryTasksRequest

type InternalAddHistoryTasksRequest struct {
	ShardID int32
	RangeID int64

	NamespaceID string
	WorkflowID  string
	ArchetypeID chasm.ArchetypeID

	Tasks map[tasks.Category][]InternalHistoryTask `json:",omitempty"`
}

InternalAddHistoryTasksRequest is used to write new tasks

type InternalAppendHistoryNodesRequest

type InternalAppendHistoryNodesRequest struct {
	// The raw branch token
	BranchToken []byte
	// True if it is the first append request to the branch
	IsNewBranch bool
	// The info for clean up data in background
	Info string
	// The branch to be appended
	BranchInfo *persistencespb.HistoryBranch
	// Serialized TreeInfo
	TreeInfo *commonpb.DataBlob
	// The history node
	Node InternalHistoryNode
	// Used in sharded data stores to identify which shard to use
	ShardID int32
}

InternalAppendHistoryNodesRequest is used to append a batch of history nodes

type InternalChasmNode

type InternalChasmNode struct {
	Metadata *commonpb.DataBlob
	Data     *commonpb.DataBlob

	// Only set when Cassandra is used as the persistence layer. When set, Metadata
	// and Data will be unset. *No* code outside of the ExecutionManager or Cassandra
	// store should reference this field.
	//
	// As an optimization to avoid an extra encode/deocde step, the Cassandra version
	// is encoded in a single blob up-front.
	CassandraBlob *commonpb.DataBlob
}

type InternalCompleteForkBranchRequest

type InternalCompleteForkBranchRequest struct {
	// branch to be updated
	BranchInfo persistencespb.HistoryBranch
	// whether fork is successful
	Success bool
	// Used in sharded data stores to identify which shard to use
	ShardID int32
}

InternalCompleteForkBranchRequest is used to update some tree/branch meta data for forking

type InternalConflictResolveWorkflowExecutionRequest

type InternalConflictResolveWorkflowExecutionRequest struct {
	ShardID int32
	RangeID int64

	Mode ConflictResolveWorkflowMode

	ArchetypeID chasm.ArchetypeID

	// workflow to be resetted
	ResetWorkflowSnapshot        InternalWorkflowSnapshot
	ResetWorkflowEventsNewEvents []*InternalAppendHistoryNodesRequest `json:",omitempty"`
	// maybe new workflow
	NewWorkflowSnapshot        *InternalWorkflowSnapshot
	NewWorkflowEventsNewEvents []*InternalAppendHistoryNodesRequest `json:",omitempty"`

	// current workflow
	CurrentWorkflowMutation        *InternalWorkflowMutation
	CurrentWorkflowEventsNewEvents []*InternalAppendHistoryNodesRequest `json:",omitempty"`
}

InternalConflictResolveWorkflowExecutionRequest is used to reset workflow execution state for Persistence Interface

type InternalCreateNamespaceRequest

type InternalCreateNamespaceRequest struct {
	ID        string
	Name      string
	Namespace *commonpb.DataBlob
	IsGlobal  bool
}

InternalCreateNamespaceRequest is used to create the namespace

type InternalCreateOrUpdateNexusEndpointRequest

type InternalCreateOrUpdateNexusEndpointRequest struct {
	LastKnownTableVersion int64
	Endpoint              InternalNexusEndpoint
}

type InternalCreateQueueRequest

type InternalCreateQueueRequest struct {
	QueueType QueueV2Type
	QueueName string
}

type InternalCreateQueueResponse

type InternalCreateQueueResponse struct {
}

type InternalCreateTask

type InternalCreateTask struct {
	TaskPass   int64
	TaskId     int64
	ExpiryTime *timestamppb.Timestamp
	Task       *commonpb.DataBlob
	Subqueue   int
}

type InternalCreateTaskQueueRequest

type InternalCreateTaskQueueRequest struct {
	NamespaceID   string
	TaskQueue     string
	TaskType      enumspb.TaskQueueType
	RangeID       int64
	TaskQueueInfo *commonpb.DataBlob

	TaskQueueKind enumspb.TaskQueueKind
	ExpiryTime    *timestamppb.Timestamp
}

type InternalCreateTasksRequest

type InternalCreateTasksRequest struct {
	NamespaceID    string
	TaskQueue      string
	TaskType       enumspb.TaskQueueType
	RangeID        int64
	TaskQueueInfo  *commonpb.DataBlob
	Tasks          []*InternalCreateTask `json:",omitempty"`
	UpdateMetadata bool
}

type InternalCreateWorkflowExecutionRequest

type InternalCreateWorkflowExecutionRequest struct {
	ShardID int32
	RangeID int64

	Mode CreateWorkflowMode

	PreviousRunID            string
	PreviousLastWriteVersion int64

	ArchetypeID chasm.ArchetypeID

	NewWorkflowSnapshot  InternalWorkflowSnapshot
	NewWorkflowNewEvents []*InternalAppendHistoryNodesRequest `json:",omitempty"`
}

InternalCreateWorkflowExecutionRequest is used to write a new workflow execution

type InternalCreateWorkflowExecutionResponse

type InternalCreateWorkflowExecutionResponse struct {
}

InternalCreateWorkflowExecutionResponse is the response from persistence for create new workflow execution

type InternalDeleteClusterMetadataRequest

type InternalDeleteClusterMetadataRequest struct {
	ClusterName string
}

InternalDeleteClusterMetadataRequest is the request for DeleteClusterMetadata

type InternalDeleteHistoryBranchRange

type InternalDeleteHistoryBranchRange struct {
	BranchId    string
	BeginNodeId int64 // delete nodes with ID >= BeginNodeId
}

InternalDeleteHistoryBranchRange is used to delete a range of history nodes of a branch

type InternalDeleteHistoryBranchRequest

type InternalDeleteHistoryBranchRequest struct {
	// The raw branch token
	BranchToken []byte
	// The branch
	BranchInfo *persistencespb.HistoryBranch
	// Used in sharded data stores to identify which shard to use
	ShardID int32
	// branch ranges is used to delete range of history nodes from target branch and it ancestors.
	BranchRanges []InternalDeleteHistoryBranchRange `json:",omitempty"`
}

InternalDeleteHistoryBranchRequest is used to remove a history branch

type InternalDeleteHistoryNodesRequest

type InternalDeleteHistoryNodesRequest struct {
	// The raw branch token
	BranchToken []byte
	// Used in sharded data stores to identify which shard to use
	ShardID int32
	// The branch to be appended
	BranchInfo *persistencespb.HistoryBranch
	// node ID of the history node
	NodeID int64
	// transaction ID of the history node
	TransactionID int64
}

InternalDeleteHistoryNodesRequest is used to remove a history node

type InternalEnqueueMessageRequest

type InternalEnqueueMessageRequest struct {
	QueueType QueueV2Type
	QueueName string
	Blob      *commonpb.DataBlob
}

type InternalEnqueueMessageResponse

type InternalEnqueueMessageResponse struct {
	Metadata MessageMetadata
}

type InternalForkHistoryBranchRequest

type InternalForkHistoryBranchRequest struct {
	// The new branch token to fork to
	NewBranchToken []byte
	// The base branch to fork from
	ForkBranchInfo *persistencespb.HistoryBranch
	// Serialized TreeInfo
	TreeInfo *commonpb.DataBlob
	// The nodeID to fork from, the new branch will start from ( inclusive ), the base branch will stop at(exclusive)
	ForkNodeID int64
	// branchID of the new branch
	NewBranchID string
	// the info for clean up data in background
	Info string
	// Used in sharded data stores to identify which shard to use
	ShardID int32
}

InternalForkHistoryBranchRequest is used to fork a history branch

type InternalGetAllHistoryTreeBranchesResponse

type InternalGetAllHistoryTreeBranchesResponse struct {
	// pagination token
	NextPageToken []byte
	// all branches of all trees
	Branches []InternalHistoryBranchDetail `json:",omitempty"`
}

InternalGetAllHistoryTreeBranchesResponse is response to GetAllHistoryTreeBranches Only used by persistence layer

type InternalGetClusterMetadataRequest

type InternalGetClusterMetadataRequest struct {
	ClusterName string
}

InternalGetClusterMetadataRequest is the request for GetClusterMetadata

type InternalGetClusterMetadataResponse

type InternalGetClusterMetadataResponse struct {
	// Serialized MutableCusterMetadata.
	ClusterMetadata *commonpb.DataBlob
	Version         int64
}

InternalGetClusterMetadataResponse is the response for GetClusterMetadata

type InternalGetCurrentExecutionResponse

type InternalGetCurrentExecutionResponse struct {
	RunID          string
	ExecutionState *persistencespb.WorkflowExecutionState
}

type InternalGetHistoryTaskResponse

type InternalGetHistoryTaskResponse struct {
	InternalHistoryTask
}

type InternalGetHistoryTasksResponse

type InternalGetHistoryTasksResponse struct {
	Tasks         []InternalHistoryTask `json:",omitempty"`
	NextPageToken []byte
}

type InternalGetHistoryTreeContainingBranchRequest

type InternalGetHistoryTreeContainingBranchRequest struct {
	// The raw branch token
	BranchToken []byte
	// Get data from this shard
	ShardID int32
}

InternalGetHistoryTreeContainingBranchRequest is used to retrieve branch info of a history tree

type InternalGetHistoryTreeContainingBranchResponse

type InternalGetHistoryTreeContainingBranchResponse struct {
	// TreeInfos
	TreeInfos []*commonpb.DataBlob `json:",omitempty"`
}

InternalGetHistoryTreeContainingBranchResponse is response to GetHistoryTreeContainingBranch Only used by persistence layer

type InternalGetNamespaceResponse

type InternalGetNamespaceResponse struct {
	Namespace           *commonpb.DataBlob
	IsGlobal            bool
	NotificationVersion int64
}

InternalGetNamespaceResponse is the response for GetNamespace

type InternalGetOrCreateShardRequest

type InternalGetOrCreateShardRequest struct {
	ShardID          int32
	CreateShardInfo  func() (rangeID int64, shardInfo *commonpb.DataBlob, err error) `json:"-"` // cannot be serialized otherwise
	LifecycleContext context.Context                                                 // cancelled when shard is unloaded
}

InternalGetOrCreateShardRequest is used by ShardStore to retrieve or create a shard. GetOrCreateShard should: if shard exists, return it. If not, call CreateShardInfo and create the shard with the returned value.

type InternalGetOrCreateShardResponse

type InternalGetOrCreateShardResponse struct {
	ShardInfo *commonpb.DataBlob
}

InternalGetOrCreateShardResponse is the response to GetShard

type InternalGetReplicationTasksFromDLQResponse

type InternalGetReplicationTasksFromDLQResponse = InternalGetHistoryTasksResponse

type InternalGetTaskQueueRequest

type InternalGetTaskQueueRequest struct {
	NamespaceID string
	TaskQueue   string
	TaskType    enumspb.TaskQueueType
}

type InternalGetTaskQueueResponse

type InternalGetTaskQueueResponse struct {
	RangeID       int64
	TaskQueueInfo *commonpb.DataBlob
}

type InternalGetTaskQueueUserDataResponse

type InternalGetTaskQueueUserDataResponse struct {
	Version  int64
	UserData *commonpb.DataBlob
}

type InternalGetTasksResponse

type InternalGetTasksResponse struct {
	Tasks         []*commonpb.DataBlob `json:",omitempty"`
	NextPageToken []byte
}

type InternalGetWorkflowExecutionResponse

type InternalGetWorkflowExecutionResponse struct {
	State           *InternalWorkflowMutableState
	DBRecordVersion int64
}

InternalGetWorkflowExecutionResponse is the response to GetworkflowExecution for Persistence Interface

type InternalHistoryBranchDetail

type InternalHistoryBranchDetail struct {
	TreeID   string
	BranchID string
	Encoding string
	Data     []byte // HistoryTreeInfo blob
}

InternalHistoryBranchDetail used by InternalGetAllHistoryTreeBranchesResponse

type InternalHistoryNode

type InternalHistoryNode struct {
	// The first eventID becomes the nodeID to be appended
	NodeID int64
	// requested TransactionID for this write operation. For the same eventID, the node with larger TransactionID always wins
	TransactionID int64
	// TransactionID for events before these events. For events chaining
	PrevTransactionID int64
	// The events to be appended
	Events *commonpb.DataBlob
}

InternalHistoryNode represent a history node metadata

type InternalHistoryTask

type InternalHistoryTask struct {
	Key  tasks.Key
	Blob *commonpb.DataBlob
}

type InternalListClusterMetadataRequest

type InternalListClusterMetadataRequest struct {
	PageSize      int
	NextPageToken []byte
}

InternalListClusterMetadataRequest is the request for ListClusterMetadata

type InternalListClusterMetadataResponse

type InternalListClusterMetadataResponse struct {
	ClusterMetadata []*InternalGetClusterMetadataResponse `json:",omitempty"`
	NextPageToken   []byte
}

InternalListClusterMetadataResponse is the response for ListClusterMetadata

type InternalListConcreteExecutionsResponse

type InternalListConcreteExecutionsResponse struct {
	States        []*InternalWorkflowMutableState `json:",omitempty"`
	NextPageToken []byte
}

InternalListConcreteExecutionsResponse is the response to ListConcreteExecutions for Persistence Interface

type InternalListNamespacesRequest

type InternalListNamespacesRequest struct {
	PageSize      int
	NextPageToken []byte
}

type InternalListNamespacesResponse

type InternalListNamespacesResponse struct {
	Namespaces    []*InternalGetNamespaceResponse `json:",omitempty"`
	NextPageToken []byte
}

InternalListNamespacesResponse is the response for GetNamespace

type InternalListNexusEndpointsResponse

type InternalListNexusEndpointsResponse struct {
	TableVersion  int64
	NextPageToken []byte
	Endpoints     []InternalNexusEndpoint `json:",omitempty"`
}

type InternalListQueuesRequest

type InternalListQueuesRequest struct {
	QueueType     QueueV2Type
	PageSize      int
	NextPageToken []byte
}

type InternalListQueuesResponse

type InternalListQueuesResponse struct {
	Queues        []QueueInfo `json:",omitempty"`
	NextPageToken []byte
}

type InternalListTaskQueueItem

type InternalListTaskQueueItem struct {
	TaskQueue *commonpb.DataBlob // serialized PersistedTaskQueueInfo
	RangeID   int64
}

type InternalListTaskQueueResponse

type InternalListTaskQueueResponse struct {
	Items         []*InternalListTaskQueueItem `json:",omitempty"`
	NextPageToken []byte
}

type InternalListTaskQueueUserDataEntriesResponse

type InternalListTaskQueueUserDataEntriesResponse struct {
	NextPageToken []byte
	Entries       []InternalTaskQueueUserDataEntry `json:",omitempty"`
}

type InternalNexusEndpoint

type InternalNexusEndpoint struct {
	ID      string
	Version int64
	Data    *commonpb.DataBlob
}

type InternalQueueMetadata

type InternalQueueMetadata struct {
	Blob    *commonpb.DataBlob
	Version int64
}

type InternalRangeDeleteMessagesRequest

type InternalRangeDeleteMessagesRequest struct {
	QueueType                   QueueV2Type
	QueueName                   string
	InclusiveMaxMessageMetadata MessageMetadata
}

InternalRangeDeleteMessagesRequest deletes all messages with ID <= given messageID

type InternalRangeDeleteMessagesResponse

type InternalRangeDeleteMessagesResponse struct {
	MessagesDeleted int64
}

type InternalReadHistoryBranchRequest

type InternalReadHistoryBranchRequest struct {
	// The raw branch token
	BranchToken []byte
	// The branch range to be read
	BranchID string
	// Get the history nodes from MinNodeID. Inclusive.
	MinNodeID int64
	// Get the history nodes upto MaxNodeID.  Exclusive.
	MaxNodeID int64
	// passing thru for pagination
	PageSize int
	// Pagination token
	NextPageToken []byte
	// Used in sharded data stores to identify which shard to use
	ShardID int32
	// whether to only return metadata, excluding node content
	MetadataOnly bool
	// whether we iterate in reverse order
	ReverseOrder bool
}

InternalReadHistoryBranchRequest is used to read a history branch

type InternalReadHistoryBranchResponse

type InternalReadHistoryBranchResponse struct {
	// History nodes
	Nodes []InternalHistoryNode `json:",omitempty"`
	// Pagination token
	NextPageToken []byte
}

InternalReadHistoryBranchResponse is the response to ReadHistoryBranchRequest

type InternalReadMessagesRequest

type InternalReadMessagesRequest struct {
	QueueType     QueueV2Type
	QueueName     string
	PageSize      int
	NextPageToken []byte
}

type InternalReadMessagesResponse

type InternalReadMessagesResponse struct {
	Messages      []QueueV2Message `json:",omitempty"`
	NextPageToken []byte
}

type InternalRenameNamespaceRequest

type InternalRenameNamespaceRequest struct {
	*InternalUpdateNamespaceRequest
	PreviousName string
}

type InternalSaveClusterMetadataRequest

type InternalSaveClusterMetadataRequest struct {
	ClusterName string
	// Serialized MutableCusterMetadata.
	ClusterMetadata *commonpb.DataBlob
	Version         int64
}

InternalSaveClusterMetadataRequest is the request for SaveClusterMetadata

type InternalSetWorkflowExecutionRequest

type InternalSetWorkflowExecutionRequest struct {
	ShardID int32
	RangeID int64

	ArchetypeID chasm.ArchetypeID

	SetWorkflowSnapshot InternalWorkflowSnapshot
}

type InternalSingleTaskQueueUserDataUpdate

type InternalSingleTaskQueueUserDataUpdate struct {
	Version  int64
	UserData *commonpb.DataBlob
	// Used to build an index of build_id to task_queues
	BuildIdsAdded   []string `json:",omitempty"`
	BuildIdsRemoved []string `json:",omitempty"`
	Applied         *bool
	Conflicting     *bool
}

type InternalTaskQueueUserDataEntry

type InternalTaskQueueUserDataEntry struct {
	TaskQueue string
	Data      *commonpb.DataBlob
	Version   int64
}

type InternalUpdateNamespaceRequest

type InternalUpdateNamespaceRequest struct {
	Id                  string
	Name                string
	Namespace           *commonpb.DataBlob
	NotificationVersion int64
	IsGlobal            bool
}

InternalUpdateNamespaceRequest is used to update namespace

type InternalUpdateShardRequest

type InternalUpdateShardRequest struct {
	ShardID         int32
	RangeID         int64
	Owner           string
	ShardInfo       *commonpb.DataBlob
	PreviousRangeID int64
}

InternalUpdateShardRequest is used by ShardStore to update a shard

type InternalUpdateTaskQueueRequest

type InternalUpdateTaskQueueRequest struct {
	NamespaceID   string
	TaskQueue     string
	TaskType      enumspb.TaskQueueType
	RangeID       int64
	TaskQueueInfo *commonpb.DataBlob

	TaskQueueKind enumspb.TaskQueueKind
	ExpiryTime    *timestamppb.Timestamp

	PrevRangeID int64
}

type InternalUpdateTaskQueueUserDataRequest

type InternalUpdateTaskQueueUserDataRequest struct {
	NamespaceID string
	Updates     map[string]*InternalSingleTaskQueueUserDataUpdate // key is task queue name
}

type InternalUpdateWorkflowExecutionRequest

type InternalUpdateWorkflowExecutionRequest struct {
	ShardID int32
	RangeID int64

	Mode UpdateWorkflowMode

	ArchetypeID chasm.ArchetypeID

	UpdateWorkflowMutation  InternalWorkflowMutation
	UpdateWorkflowNewEvents []*InternalAppendHistoryNodesRequest `json:",omitempty"`
	NewWorkflowSnapshot     *InternalWorkflowSnapshot
	NewWorkflowNewEvents    []*InternalAppendHistoryNodesRequest `json:",omitempty"`
}

InternalUpdateWorkflowExecutionRequest is used to update a workflow execution for Persistence Interface

type InternalUpsertClusterMembershipRequest

type InternalUpsertClusterMembershipRequest struct {
	ClusterMember
	RecordExpiry time.Time
}

InternalUpsertClusterMembershipRequest is the request to UpsertClusterMembership

type InternalWorkflowMutableState

type InternalWorkflowMutableState struct {
	ActivityInfos       map[int64]*commonpb.DataBlob  `json:",omitempty"` // ActivityInfo
	TimerInfos          map[string]*commonpb.DataBlob `json:",omitempty"` // TimerInfo
	ChildExecutionInfos map[int64]*commonpb.DataBlob  `json:",omitempty"` // ChildExecutionInfo
	RequestCancelInfos  map[int64]*commonpb.DataBlob  `json:",omitempty"` // RequestCancelInfo
	SignalInfos         map[int64]*commonpb.DataBlob  `json:",omitempty"` // SignalInfo
	ChasmNodes          map[string]InternalChasmNode  `json:",omitempty"` // persistencespb.ChasmNode
	SignalRequestedIDs  []string                      `json:",omitempty"`
	ExecutionInfo       *commonpb.DataBlob            // WorkflowExecutionInfo
	ExecutionState      *commonpb.DataBlob            // WorkflowExecutionState
	NextEventID         int64
	BufferedEvents      []*commonpb.DataBlob `json:",omitempty"`
	Checksum            *commonpb.DataBlob   // persistencespb.Checksum
	DBRecordVersion     int64
}

InternalWorkflowMutableState indicates workflow related state for Persistence Interface

type InternalWorkflowMutation

type InternalWorkflowMutation struct {
	// TODO: properly set this on call sites
	NamespaceID string
	WorkflowID  string
	RunID       string

	ExecutionInfo      *persistencespb.WorkflowExecutionInfo
	ExecutionInfoBlob  *commonpb.DataBlob `json:"-"` // redundant in JSON
	ExecutionState     *persistencespb.WorkflowExecutionState
	ExecutionStateBlob *commonpb.DataBlob `json:"-"` // redundant in JSON
	NextEventID        int64
	StartVersion       int64
	LastWriteVersion   int64
	DBRecordVersion    int64

	UpsertActivityInfos       map[int64]*commonpb.DataBlob  `json:",omitempty"`
	DeleteActivityInfos       map[int64]struct{}            `json:",omitempty"`
	UpsertTimerInfos          map[string]*commonpb.DataBlob `json:",omitempty"`
	DeleteTimerInfos          map[string]struct{}           `json:",omitempty"`
	UpsertChildExecutionInfos map[int64]*commonpb.DataBlob  `json:",omitempty"`
	DeleteChildExecutionInfos map[int64]struct{}            `json:",omitempty"`
	UpsertRequestCancelInfos  map[int64]*commonpb.DataBlob  `json:",omitempty"`
	DeleteRequestCancelInfos  map[int64]struct{}            `json:",omitempty"`
	UpsertSignalInfos         map[int64]*commonpb.DataBlob  `json:",omitempty"`
	DeleteSignalInfos         map[int64]struct{}            `json:",omitempty"`
	UpsertChasmNodes          map[string]InternalChasmNode  `json:",omitempty"`
	DeleteChasmNodes          map[string]struct{}           `json:",omitempty"`
	UpsertSignalRequestedIDs  map[string]struct{}           `json:",omitempty"`
	DeleteSignalRequestedIDs  map[string]struct{}           `json:",omitempty"`
	NewBufferedEvents         *commonpb.DataBlob
	ClearBufferedEvents       bool

	Tasks map[tasks.Category][]InternalHistoryTask `json:",omitempty"`

	Condition int64

	Checksum *commonpb.DataBlob
}

InternalWorkflowMutation is used as generic workflow execution state mutation for Persistence Interface

type InternalWorkflowSnapshot

type InternalWorkflowSnapshot struct {
	// TODO: properly set this on call sites
	NamespaceID string
	WorkflowID  string
	RunID       string

	ExecutionInfo      *persistencespb.WorkflowExecutionInfo
	ExecutionInfoBlob  *commonpb.DataBlob `json:"-"` // redundant in JSON
	ExecutionState     *persistencespb.WorkflowExecutionState
	ExecutionStateBlob *commonpb.DataBlob `json:"-"` // redundant in JSON
	StartVersion       int64
	LastWriteVersion   int64
	NextEventID        int64
	DBRecordVersion    int64

	ActivityInfos       map[int64]*commonpb.DataBlob  `json:",omitempty"`
	TimerInfos          map[string]*commonpb.DataBlob `json:",omitempty"`
	ChildExecutionInfos map[int64]*commonpb.DataBlob  `json:",omitempty"`
	RequestCancelInfos  map[int64]*commonpb.DataBlob  `json:",omitempty"`
	SignalInfos         map[int64]*commonpb.DataBlob  `json:",omitempty"`
	ChasmNodes          map[string]InternalChasmNode  `json:",omitempty"`
	SignalRequestedIDs  map[string]struct{}           `json:",omitempty"`

	Tasks map[tasks.Category][]InternalHistoryTask `json:",omitempty"`

	Condition int64

	Checksum *commonpb.DataBlob
}

InternalWorkflowSnapshot is used as generic workflow execution state snapshot for Persistence Interface

type InvalidPersistenceRequestError

type InvalidPersistenceRequestError struct {
	Msg string
}

InvalidPersistenceRequestError represents invalid request to persistence

func (*InvalidPersistenceRequestError) Error

type ListClusterMetadataRequest

type ListClusterMetadataRequest struct {
	PageSize      int
	NextPageToken []byte
}

ListClusterMetadataRequest is the request to ListClusterMetadata

type ListClusterMetadataResponse

type ListClusterMetadataResponse struct {
	ClusterMetadata []*GetClusterMetadataResponse
	NextPageToken   []byte
}

ListClusterMetadataResponse is the response to ListClusterMetadata

type ListConcreteExecutionsRequest

type ListConcreteExecutionsRequest struct {
	ShardID   int32
	PageSize  int
	PageToken []byte
}

ListConcreteExecutionsRequest is request to ListConcreteExecutions

type ListConcreteExecutionsResponse

type ListConcreteExecutionsResponse struct {
	States    []*persistencespb.WorkflowMutableState
	PageToken []byte
}

ListConcreteExecutionsResponse is response to ListConcreteExecutions

type ListNamespacesRequest

type ListNamespacesRequest struct {
	PageSize       int
	NextPageToken  []byte
	IncludeDeleted bool
}

ListNamespacesRequest is used to list namespaces

type ListNamespacesResponse

type ListNamespacesResponse struct {
	Namespaces    []*GetNamespaceResponse
	NextPageToken []byte
}

ListNamespacesResponse is the response for GetNamespace

type ListNexusEndpointsRequest

type ListNexusEndpointsRequest struct {
	LastKnownTableVersion int64
	NextPageToken         []byte
	PageSize              int
}

type ListNexusEndpointsResponse

type ListNexusEndpointsResponse struct {
	TableVersion  int64
	NextPageToken []byte
	Entries       []*persistencespb.NexusEndpointEntry
}

type ListQueuesRequest

type ListQueuesRequest struct {
	QueueType     QueueV2Type
	PageSize      int
	NextPageToken []byte
}

type ListQueuesResponse

type ListQueuesResponse struct {
	Queues        []QueueInfo
	NextPageToken []byte
}

type ListTaskQueueRequest

type ListTaskQueueRequest struct {
	PageSize  int
	PageToken []byte
}

ListTaskQueueRequest contains the request params needed to invoke ListTaskQueue API

type ListTaskQueueResponse

type ListTaskQueueResponse struct {
	Items         []*PersistedTaskQueueInfo
	NextPageToken []byte
}

ListTaskQueueResponse is the response from ListTaskQueue API

type ListTaskQueueUserDataEntriesRequest

type ListTaskQueueUserDataEntriesRequest struct {
	NamespaceID   string
	PageSize      int
	NextPageToken []byte
}

type ListTaskQueueUserDataEntriesResponse

type ListTaskQueueUserDataEntriesResponse struct {
	NextPageToken []byte
	Entries       []*TaskQueueUserDataEntry
}

type MessageMetadata

type MessageMetadata struct {
	ID int64
}

type MetadataManager

type MetadataManager interface {
	Closeable
	GetName() string
	CreateNamespace(ctx context.Context, request *CreateNamespaceRequest) (*CreateNamespaceResponse, error)
	GetNamespace(ctx context.Context, request *GetNamespaceRequest) (*GetNamespaceResponse, error)
	UpdateNamespace(ctx context.Context, request *UpdateNamespaceRequest) error
	RenameNamespace(ctx context.Context, request *RenameNamespaceRequest) error
	DeleteNamespace(ctx context.Context, request *DeleteNamespaceRequest) error
	DeleteNamespaceByName(ctx context.Context, request *DeleteNamespaceByNameRequest) error
	ListNamespaces(ctx context.Context, request *ListNamespacesRequest) (*ListNamespacesResponse, error)
	GetMetadata(ctx context.Context) (*GetMetadataResponse, error)
	InitializeSystemNamespaces(ctx context.Context, currentClusterName string) error
	WatchNamespaces(ctx context.Context) (<-chan *NamespaceWatchEvent, error)
}

MetadataManager is used to manage metadata CRUD for namespace entities

func NewMetadataManagerImpl

func NewMetadataManagerImpl(
	persistence MetadataStore,
	serializer serialization.Serializer,
	logger log.Logger,
	clusterName string,
) MetadataManager

NewMetadataManagerImpl returns new MetadataManager

func NewMetadataPersistenceMetricsClient

func NewMetadataPersistenceMetricsClient(persistence MetadataManager, metricsHandler metrics.Handler, healthSignals HealthSignalAggregator, logger log.Logger, enableDataLossMetrics dynamicconfig.BoolPropertyFn) MetadataManager

NewMetadataPersistenceMetricsClient creates a MetadataManager client to manage metadata

func NewMetadataPersistenceRateLimitedClient

func NewMetadataPersistenceRateLimitedClient(
	persistence MetadataManager,
	systemRateLimiter quotas.RequestRateLimiter,
	namespaceRateLimiter quotas.RequestRateLimiter,
	shardRateLimiter quotas.RequestRateLimiter,
	logger log.Logger,
) MetadataManager

NewMetadataPersistenceRateLimitedClient creates a MetadataManager client to manage metadata

func NewMetadataPersistenceRetryableClient

func NewMetadataPersistenceRetryableClient(
	persistence MetadataManager,
	policy backoff.RetryPolicy,
	isRetryable backoff.IsRetryable,
) MetadataManager

NewMetadataPersistenceRetryableClient creates a MetadataManager client to manage metadata

type MetadataStore

type MetadataStore interface {
	Closeable
	GetName() string
	CreateNamespace(ctx context.Context, request *InternalCreateNamespaceRequest) (*CreateNamespaceResponse, error)
	GetNamespace(ctx context.Context, request *GetNamespaceRequest) (*InternalGetNamespaceResponse, error)
	UpdateNamespace(ctx context.Context, request *InternalUpdateNamespaceRequest) error
	RenameNamespace(ctx context.Context, request *InternalRenameNamespaceRequest) error
	DeleteNamespace(ctx context.Context, request *DeleteNamespaceRequest) error
	DeleteNamespaceByName(ctx context.Context, request *DeleteNamespaceByNameRequest) error
	ListNamespaces(ctx context.Context, request *InternalListNamespacesRequest) (*InternalListNamespacesResponse, error)
	GetMetadata(ctx context.Context) (*GetMetadataResponse, error)
}

MetadataStore is a lower level of MetadataManager

type MockCloseable

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

MockCloseable is a mock of Closeable interface.

func NewMockCloseable

func NewMockCloseable(ctrl *gomock.Controller) *MockCloseable

NewMockCloseable creates a new mock instance.

func (*MockCloseable) Close

func (m *MockCloseable) Close()

Close mocks base method.

func (*MockCloseable) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockCloseableMockRecorder

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

MockCloseableMockRecorder is the mock recorder for MockCloseable.

func (*MockCloseableMockRecorder) Close

func (mr *MockCloseableMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

type MockClusterMetadataManager

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

MockClusterMetadataManager is a mock of ClusterMetadataManager interface.

func NewMockClusterMetadataManager

func NewMockClusterMetadataManager(ctrl *gomock.Controller) *MockClusterMetadataManager

NewMockClusterMetadataManager creates a new mock instance.

func (*MockClusterMetadataManager) Close

func (m *MockClusterMetadataManager) Close()

Close mocks base method.

func (*MockClusterMetadataManager) DeleteClusterMetadata

func (m *MockClusterMetadataManager) DeleteClusterMetadata(ctx context.Context, request *DeleteClusterMetadataRequest) error

DeleteClusterMetadata mocks base method.

func (*MockClusterMetadataManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClusterMetadataManager) GetClusterMembers

GetClusterMembers mocks base method.

func (*MockClusterMetadataManager) GetClusterMetadata

GetClusterMetadata mocks base method.

func (*MockClusterMetadataManager) GetCurrentClusterMetadata

func (m *MockClusterMetadataManager) GetCurrentClusterMetadata(ctx context.Context) (*GetClusterMetadataResponse, error)

GetCurrentClusterMetadata mocks base method.

func (*MockClusterMetadataManager) GetName

func (m *MockClusterMetadataManager) GetName() string

GetName mocks base method.

func (*MockClusterMetadataManager) ListClusterMetadata

ListClusterMetadata mocks base method.

func (*MockClusterMetadataManager) PruneClusterMembership

func (m *MockClusterMetadataManager) PruneClusterMembership(ctx context.Context, request *PruneClusterMembershipRequest) error

PruneClusterMembership mocks base method.

func (*MockClusterMetadataManager) SaveClusterMetadata

func (m *MockClusterMetadataManager) SaveClusterMetadata(ctx context.Context, request *SaveClusterMetadataRequest) (bool, error)

SaveClusterMetadata mocks base method.

func (*MockClusterMetadataManager) UpsertClusterMembership

func (m *MockClusterMetadataManager) UpsertClusterMembership(ctx context.Context, request *UpsertClusterMembershipRequest) error

UpsertClusterMembership mocks base method.

type MockClusterMetadataManagerMockRecorder

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

MockClusterMetadataManagerMockRecorder is the mock recorder for MockClusterMetadataManager.

func (*MockClusterMetadataManagerMockRecorder) Close

Close indicates an expected call of Close.

func (*MockClusterMetadataManagerMockRecorder) DeleteClusterMetadata

func (mr *MockClusterMetadataManagerMockRecorder) DeleteClusterMetadata(ctx, request any) *gomock.Call

DeleteClusterMetadata indicates an expected call of DeleteClusterMetadata.

func (*MockClusterMetadataManagerMockRecorder) GetClusterMembers

func (mr *MockClusterMetadataManagerMockRecorder) GetClusterMembers(ctx, request any) *gomock.Call

GetClusterMembers indicates an expected call of GetClusterMembers.

func (*MockClusterMetadataManagerMockRecorder) GetClusterMetadata

func (mr *MockClusterMetadataManagerMockRecorder) GetClusterMetadata(ctx, request any) *gomock.Call

GetClusterMetadata indicates an expected call of GetClusterMetadata.

func (*MockClusterMetadataManagerMockRecorder) GetCurrentClusterMetadata

func (mr *MockClusterMetadataManagerMockRecorder) GetCurrentClusterMetadata(ctx any) *gomock.Call

GetCurrentClusterMetadata indicates an expected call of GetCurrentClusterMetadata.

func (*MockClusterMetadataManagerMockRecorder) GetName

GetName indicates an expected call of GetName.

func (*MockClusterMetadataManagerMockRecorder) ListClusterMetadata

func (mr *MockClusterMetadataManagerMockRecorder) ListClusterMetadata(ctx, request any) *gomock.Call

ListClusterMetadata indicates an expected call of ListClusterMetadata.

func (*MockClusterMetadataManagerMockRecorder) PruneClusterMembership

func (mr *MockClusterMetadataManagerMockRecorder) PruneClusterMembership(ctx, request any) *gomock.Call

PruneClusterMembership indicates an expected call of PruneClusterMembership.

func (*MockClusterMetadataManagerMockRecorder) SaveClusterMetadata

func (mr *MockClusterMetadataManagerMockRecorder) SaveClusterMetadata(ctx, request any) *gomock.Call

SaveClusterMetadata indicates an expected call of SaveClusterMetadata.

func (*MockClusterMetadataManagerMockRecorder) UpsertClusterMembership

func (mr *MockClusterMetadataManagerMockRecorder) UpsertClusterMembership(ctx, request any) *gomock.Call

UpsertClusterMembership indicates an expected call of UpsertClusterMembership.

type MockExecutionManager

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

MockExecutionManager is a mock of ExecutionManager interface.

func NewMockExecutionManager

func NewMockExecutionManager(ctrl *gomock.Controller) *MockExecutionManager

NewMockExecutionManager creates a new mock instance.

func (*MockExecutionManager) AddHistoryTasks

func (m *MockExecutionManager) AddHistoryTasks(ctx context.Context, request *AddHistoryTasksRequest) error

AddHistoryTasks mocks base method.

func (*MockExecutionManager) AppendHistoryNodes

AppendHistoryNodes mocks base method.

func (*MockExecutionManager) AppendRawHistoryNodes

AppendRawHistoryNodes mocks base method.

func (*MockExecutionManager) Close

func (m *MockExecutionManager) Close()

Close mocks base method.

func (*MockExecutionManager) CompleteHistoryTask

func (m *MockExecutionManager) CompleteHistoryTask(ctx context.Context, request *CompleteHistoryTaskRequest) error

CompleteHistoryTask mocks base method.

func (*MockExecutionManager) ConflictResolveWorkflowExecution

ConflictResolveWorkflowExecution mocks base method.

func (*MockExecutionManager) CreateWorkflowExecution

CreateWorkflowExecution mocks base method.

func (*MockExecutionManager) DeleteCurrentWorkflowExecution

func (m *MockExecutionManager) DeleteCurrentWorkflowExecution(ctx context.Context, request *DeleteCurrentWorkflowExecutionRequest) error

DeleteCurrentWorkflowExecution mocks base method.

func (*MockExecutionManager) DeleteHistoryBranch

func (m *MockExecutionManager) DeleteHistoryBranch(ctx context.Context, request *DeleteHistoryBranchRequest) error

DeleteHistoryBranch mocks base method.

func (*MockExecutionManager) DeleteReplicationTaskFromDLQ

func (m *MockExecutionManager) DeleteReplicationTaskFromDLQ(ctx context.Context, request *DeleteReplicationTaskFromDLQRequest) error

DeleteReplicationTaskFromDLQ mocks base method.

func (*MockExecutionManager) DeleteWorkflowExecution

func (m *MockExecutionManager) DeleteWorkflowExecution(ctx context.Context, request *DeleteWorkflowExecutionRequest) error

DeleteWorkflowExecution mocks base method.

func (*MockExecutionManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockExecutionManager) ForkHistoryBranch

ForkHistoryBranch mocks base method.

func (*MockExecutionManager) GetAllHistoryTreeBranches

GetAllHistoryTreeBranches mocks base method.

func (*MockExecutionManager) GetCurrentExecution

GetCurrentExecution mocks base method.

func (*MockExecutionManager) GetHistoryBranchUtil

func (m *MockExecutionManager) GetHistoryBranchUtil() HistoryBranchUtil

GetHistoryBranchUtil mocks base method.

func (*MockExecutionManager) GetHistoryTasks

GetHistoryTasks mocks base method.

func (*MockExecutionManager) GetName

func (m *MockExecutionManager) GetName() string

GetName mocks base method.

func (*MockExecutionManager) GetReplicationTasksFromDLQ

GetReplicationTasksFromDLQ mocks base method.

func (*MockExecutionManager) GetWorkflowExecution

GetWorkflowExecution mocks base method.

func (*MockExecutionManager) IsReplicationDLQEmpty

func (m *MockExecutionManager) IsReplicationDLQEmpty(ctx context.Context, request *GetReplicationTasksFromDLQRequest) (bool, error)

IsReplicationDLQEmpty mocks base method.

func (*MockExecutionManager) ListConcreteExecutions

ListConcreteExecutions mocks base method.

func (*MockExecutionManager) PutReplicationTaskToDLQ

func (m *MockExecutionManager) PutReplicationTaskToDLQ(ctx context.Context, request *PutReplicationTaskToDLQRequest) error

PutReplicationTaskToDLQ mocks base method.

func (*MockExecutionManager) RangeCompleteHistoryTasks

func (m *MockExecutionManager) RangeCompleteHistoryTasks(ctx context.Context, request *RangeCompleteHistoryTasksRequest) error

RangeCompleteHistoryTasks mocks base method.

func (*MockExecutionManager) RangeDeleteReplicationTaskFromDLQ

func (m *MockExecutionManager) RangeDeleteReplicationTaskFromDLQ(ctx context.Context, request *RangeDeleteReplicationTaskFromDLQRequest) error

RangeDeleteReplicationTaskFromDLQ mocks base method.

func (*MockExecutionManager) ReadHistoryBranch

ReadHistoryBranch mocks base method.

func (*MockExecutionManager) ReadHistoryBranchByBatch

ReadHistoryBranchByBatch mocks base method.

func (*MockExecutionManager) ReadHistoryBranchReverse

ReadHistoryBranchReverse mocks base method.

func (*MockExecutionManager) ReadRawHistoryBranch

ReadRawHistoryBranch mocks base method.

func (*MockExecutionManager) SetWorkflowExecution

SetWorkflowExecution mocks base method.

func (*MockExecutionManager) TrimHistoryBranch

TrimHistoryBranch mocks base method.

func (*MockExecutionManager) UpdateWorkflowExecution

UpdateWorkflowExecution mocks base method.

type MockExecutionManagerMockRecorder

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

MockExecutionManagerMockRecorder is the mock recorder for MockExecutionManager.

func (*MockExecutionManagerMockRecorder) AddHistoryTasks

func (mr *MockExecutionManagerMockRecorder) AddHistoryTasks(ctx, request any) *gomock.Call

AddHistoryTasks indicates an expected call of AddHistoryTasks.

func (*MockExecutionManagerMockRecorder) AppendHistoryNodes

func (mr *MockExecutionManagerMockRecorder) AppendHistoryNodes(ctx, request any) *gomock.Call

AppendHistoryNodes indicates an expected call of AppendHistoryNodes.

func (*MockExecutionManagerMockRecorder) AppendRawHistoryNodes

func (mr *MockExecutionManagerMockRecorder) AppendRawHistoryNodes(ctx, request any) *gomock.Call

AppendRawHistoryNodes indicates an expected call of AppendRawHistoryNodes.

func (*MockExecutionManagerMockRecorder) Close

Close indicates an expected call of Close.

func (*MockExecutionManagerMockRecorder) CompleteHistoryTask

func (mr *MockExecutionManagerMockRecorder) CompleteHistoryTask(ctx, request any) *gomock.Call

CompleteHistoryTask indicates an expected call of CompleteHistoryTask.

func (*MockExecutionManagerMockRecorder) ConflictResolveWorkflowExecution

func (mr *MockExecutionManagerMockRecorder) ConflictResolveWorkflowExecution(ctx, request any) *gomock.Call

ConflictResolveWorkflowExecution indicates an expected call of ConflictResolveWorkflowExecution.

func (*MockExecutionManagerMockRecorder) CreateWorkflowExecution

func (mr *MockExecutionManagerMockRecorder) CreateWorkflowExecution(ctx, request any) *gomock.Call

CreateWorkflowExecution indicates an expected call of CreateWorkflowExecution.

func (*MockExecutionManagerMockRecorder) DeleteCurrentWorkflowExecution

func (mr *MockExecutionManagerMockRecorder) DeleteCurrentWorkflowExecution(ctx, request any) *gomock.Call

DeleteCurrentWorkflowExecution indicates an expected call of DeleteCurrentWorkflowExecution.

func (*MockExecutionManagerMockRecorder) DeleteHistoryBranch

func (mr *MockExecutionManagerMockRecorder) DeleteHistoryBranch(ctx, request any) *gomock.Call

DeleteHistoryBranch indicates an expected call of DeleteHistoryBranch.

func (*MockExecutionManagerMockRecorder) DeleteReplicationTaskFromDLQ

func (mr *MockExecutionManagerMockRecorder) DeleteReplicationTaskFromDLQ(ctx, request any) *gomock.Call

DeleteReplicationTaskFromDLQ indicates an expected call of DeleteReplicationTaskFromDLQ.

func (*MockExecutionManagerMockRecorder) DeleteWorkflowExecution

func (mr *MockExecutionManagerMockRecorder) DeleteWorkflowExecution(ctx, request any) *gomock.Call

DeleteWorkflowExecution indicates an expected call of DeleteWorkflowExecution.

func (*MockExecutionManagerMockRecorder) ForkHistoryBranch

func (mr *MockExecutionManagerMockRecorder) ForkHistoryBranch(ctx, request any) *gomock.Call

ForkHistoryBranch indicates an expected call of ForkHistoryBranch.

func (*MockExecutionManagerMockRecorder) GetAllHistoryTreeBranches

func (mr *MockExecutionManagerMockRecorder) GetAllHistoryTreeBranches(ctx, request any) *gomock.Call

GetAllHistoryTreeBranches indicates an expected call of GetAllHistoryTreeBranches.

func (*MockExecutionManagerMockRecorder) GetCurrentExecution

func (mr *MockExecutionManagerMockRecorder) GetCurrentExecution(ctx, request any) *gomock.Call

GetCurrentExecution indicates an expected call of GetCurrentExecution.

func (*MockExecutionManagerMockRecorder) GetHistoryBranchUtil

func (mr *MockExecutionManagerMockRecorder) GetHistoryBranchUtil() *gomock.Call

GetHistoryBranchUtil indicates an expected call of GetHistoryBranchUtil.

func (*MockExecutionManagerMockRecorder) GetHistoryTasks

func (mr *MockExecutionManagerMockRecorder) GetHistoryTasks(ctx, request any) *gomock.Call

GetHistoryTasks indicates an expected call of GetHistoryTasks.

func (*MockExecutionManagerMockRecorder) GetName

GetName indicates an expected call of GetName.

func (*MockExecutionManagerMockRecorder) GetReplicationTasksFromDLQ

func (mr *MockExecutionManagerMockRecorder) GetReplicationTasksFromDLQ(ctx, request any) *gomock.Call

GetReplicationTasksFromDLQ indicates an expected call of GetReplicationTasksFromDLQ.

func (*MockExecutionManagerMockRecorder) GetWorkflowExecution

func (mr *MockExecutionManagerMockRecorder) GetWorkflowExecution(ctx, request any) *gomock.Call

GetWorkflowExecution indicates an expected call of GetWorkflowExecution.

func (*MockExecutionManagerMockRecorder) IsReplicationDLQEmpty

func (mr *MockExecutionManagerMockRecorder) IsReplicationDLQEmpty(ctx, request any) *gomock.Call

IsReplicationDLQEmpty indicates an expected call of IsReplicationDLQEmpty.

func (*MockExecutionManagerMockRecorder) ListConcreteExecutions

func (mr *MockExecutionManagerMockRecorder) ListConcreteExecutions(ctx, request any) *gomock.Call

ListConcreteExecutions indicates an expected call of ListConcreteExecutions.

func (*MockExecutionManagerMockRecorder) PutReplicationTaskToDLQ

func (mr *MockExecutionManagerMockRecorder) PutReplicationTaskToDLQ(ctx, request any) *gomock.Call

PutReplicationTaskToDLQ indicates an expected call of PutReplicationTaskToDLQ.

func (*MockExecutionManagerMockRecorder) RangeCompleteHistoryTasks

func (mr *MockExecutionManagerMockRecorder) RangeCompleteHistoryTasks(ctx, request any) *gomock.Call

RangeCompleteHistoryTasks indicates an expected call of RangeCompleteHistoryTasks.

func (*MockExecutionManagerMockRecorder) RangeDeleteReplicationTaskFromDLQ

func (mr *MockExecutionManagerMockRecorder) RangeDeleteReplicationTaskFromDLQ(ctx, request any) *gomock.Call

RangeDeleteReplicationTaskFromDLQ indicates an expected call of RangeDeleteReplicationTaskFromDLQ.

func (*MockExecutionManagerMockRecorder) ReadHistoryBranch

func (mr *MockExecutionManagerMockRecorder) ReadHistoryBranch(ctx, request any) *gomock.Call

ReadHistoryBranch indicates an expected call of ReadHistoryBranch.

func (*MockExecutionManagerMockRecorder) ReadHistoryBranchByBatch

func (mr *MockExecutionManagerMockRecorder) ReadHistoryBranchByBatch(ctx, request any) *gomock.Call

ReadHistoryBranchByBatch indicates an expected call of ReadHistoryBranchByBatch.

func (*MockExecutionManagerMockRecorder) ReadHistoryBranchReverse

func (mr *MockExecutionManagerMockRecorder) ReadHistoryBranchReverse(ctx, request any) *gomock.Call

ReadHistoryBranchReverse indicates an expected call of ReadHistoryBranchReverse.

func (*MockExecutionManagerMockRecorder) ReadRawHistoryBranch

func (mr *MockExecutionManagerMockRecorder) ReadRawHistoryBranch(ctx, request any) *gomock.Call

ReadRawHistoryBranch indicates an expected call of ReadRawHistoryBranch.

func (*MockExecutionManagerMockRecorder) SetWorkflowExecution

func (mr *MockExecutionManagerMockRecorder) SetWorkflowExecution(ctx, request any) *gomock.Call

SetWorkflowExecution indicates an expected call of SetWorkflowExecution.

func (*MockExecutionManagerMockRecorder) TrimHistoryBranch

func (mr *MockExecutionManagerMockRecorder) TrimHistoryBranch(ctx, request any) *gomock.Call

TrimHistoryBranch indicates an expected call of TrimHistoryBranch.

func (*MockExecutionManagerMockRecorder) UpdateWorkflowExecution

func (mr *MockExecutionManagerMockRecorder) UpdateWorkflowExecution(ctx, request any) *gomock.Call

UpdateWorkflowExecution indicates an expected call of UpdateWorkflowExecution.

type MockHistoryBranchUtil

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

MockHistoryBranchUtil is a mock of HistoryBranchUtil interface.

func NewMockHistoryBranchUtil

func NewMockHistoryBranchUtil(ctrl *gomock.Controller) *MockHistoryBranchUtil

NewMockHistoryBranchUtil creates a new mock instance.

func (*MockHistoryBranchUtil) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockHistoryBranchUtil) NewHistoryBranch

func (m *MockHistoryBranchUtil) NewHistoryBranch(namespaceID, workflowID, runID, treeID string, branchID *string, ancestors []*persistence.HistoryBranchRange, runTimeout, executionTimeout, retentionDuration time.Duration) ([]byte, error)

NewHistoryBranch mocks base method.

func (*MockHistoryBranchUtil) ParseHistoryBranchInfo

func (m *MockHistoryBranchUtil) ParseHistoryBranchInfo(branchToken []byte) (*persistence.HistoryBranch, error)

ParseHistoryBranchInfo mocks base method.

func (*MockHistoryBranchUtil) UpdateHistoryBranchInfo

func (m *MockHistoryBranchUtil) UpdateHistoryBranchInfo(branchToken []byte, branchInfo *persistence.HistoryBranch, runID string) ([]byte, error)

UpdateHistoryBranchInfo mocks base method.

type MockHistoryBranchUtilMockRecorder

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

MockHistoryBranchUtilMockRecorder is the mock recorder for MockHistoryBranchUtil.

func (*MockHistoryBranchUtilMockRecorder) NewHistoryBranch

func (mr *MockHistoryBranchUtilMockRecorder) NewHistoryBranch(namespaceID, workflowID, runID, treeID, branchID, ancestors, runTimeout, executionTimeout, retentionDuration any) *gomock.Call

NewHistoryBranch indicates an expected call of NewHistoryBranch.

func (*MockHistoryBranchUtilMockRecorder) ParseHistoryBranchInfo

func (mr *MockHistoryBranchUtilMockRecorder) ParseHistoryBranchInfo(branchToken any) *gomock.Call

ParseHistoryBranchInfo indicates an expected call of ParseHistoryBranchInfo.

func (*MockHistoryBranchUtilMockRecorder) UpdateHistoryBranchInfo

func (mr *MockHistoryBranchUtilMockRecorder) UpdateHistoryBranchInfo(branchToken, branchInfo, runID any) *gomock.Call

UpdateHistoryBranchInfo indicates an expected call of UpdateHistoryBranchInfo.

type MockHistoryTaskQueueManager

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

MockHistoryTaskQueueManager is a mock of HistoryTaskQueueManager interface.

func NewMockHistoryTaskQueueManager

func NewMockHistoryTaskQueueManager(ctrl *gomock.Controller) *MockHistoryTaskQueueManager

NewMockHistoryTaskQueueManager creates a new mock instance.

func (*MockHistoryTaskQueueManager) Close

func (m *MockHistoryTaskQueueManager) Close()

Close mocks base method.

func (*MockHistoryTaskQueueManager) CreateQueue

CreateQueue mocks base method.

func (*MockHistoryTaskQueueManager) DeleteTasks

DeleteTasks mocks base method.

func (*MockHistoryTaskQueueManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockHistoryTaskQueueManager) EnqueueTask

EnqueueTask mocks base method.

func (*MockHistoryTaskQueueManager) ListQueues

ListQueues mocks base method.

func (*MockHistoryTaskQueueManager) ReadRawTasks

ReadRawTasks mocks base method.

func (*MockHistoryTaskQueueManager) ReadTasks

ReadTasks mocks base method.

type MockHistoryTaskQueueManagerMockRecorder

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

MockHistoryTaskQueueManagerMockRecorder is the mock recorder for MockHistoryTaskQueueManager.

func (*MockHistoryTaskQueueManagerMockRecorder) Close

Close indicates an expected call of Close.

func (*MockHistoryTaskQueueManagerMockRecorder) CreateQueue

func (mr *MockHistoryTaskQueueManagerMockRecorder) CreateQueue(ctx, request any) *gomock.Call

CreateQueue indicates an expected call of CreateQueue.

func (*MockHistoryTaskQueueManagerMockRecorder) DeleteTasks

func (mr *MockHistoryTaskQueueManagerMockRecorder) DeleteTasks(ctx, request any) *gomock.Call

DeleteTasks indicates an expected call of DeleteTasks.

func (*MockHistoryTaskQueueManagerMockRecorder) EnqueueTask

func (mr *MockHistoryTaskQueueManagerMockRecorder) EnqueueTask(ctx, request any) *gomock.Call

EnqueueTask indicates an expected call of EnqueueTask.

func (*MockHistoryTaskQueueManagerMockRecorder) ListQueues

func (mr *MockHistoryTaskQueueManagerMockRecorder) ListQueues(ctx, request any) *gomock.Call

ListQueues indicates an expected call of ListQueues.

func (*MockHistoryTaskQueueManagerMockRecorder) ReadRawTasks

func (mr *MockHistoryTaskQueueManagerMockRecorder) ReadRawTasks(ctx, request any) *gomock.Call

ReadRawTasks indicates an expected call of ReadRawTasks.

func (*MockHistoryTaskQueueManagerMockRecorder) ReadTasks

func (mr *MockHistoryTaskQueueManagerMockRecorder) ReadTasks(ctx, request any) *gomock.Call

ReadTasks indicates an expected call of ReadTasks.

type MockMetadataManager

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

MockMetadataManager is a mock of MetadataManager interface.

func NewMockMetadataManager

func NewMockMetadataManager(ctrl *gomock.Controller) *MockMetadataManager

NewMockMetadataManager creates a new mock instance.

func (*MockMetadataManager) Close

func (m *MockMetadataManager) Close()

Close mocks base method.

func (*MockMetadataManager) CreateNamespace

CreateNamespace mocks base method.

func (*MockMetadataManager) DeleteNamespace

func (m *MockMetadataManager) DeleteNamespace(ctx context.Context, request *DeleteNamespaceRequest) error

DeleteNamespace mocks base method.

func (*MockMetadataManager) DeleteNamespaceByName

func (m *MockMetadataManager) DeleteNamespaceByName(ctx context.Context, request *DeleteNamespaceByNameRequest) error

DeleteNamespaceByName mocks base method.

func (*MockMetadataManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockMetadataManager) GetMetadata

GetMetadata mocks base method.

func (*MockMetadataManager) GetName

func (m *MockMetadataManager) GetName() string

GetName mocks base method.

func (*MockMetadataManager) GetNamespace

GetNamespace mocks base method.

func (*MockMetadataManager) InitializeSystemNamespaces

func (m *MockMetadataManager) InitializeSystemNamespaces(ctx context.Context, currentClusterName string) error

InitializeSystemNamespaces mocks base method.

func (*MockMetadataManager) ListNamespaces

ListNamespaces mocks base method.

func (*MockMetadataManager) RenameNamespace

func (m *MockMetadataManager) RenameNamespace(ctx context.Context, request *RenameNamespaceRequest) error

RenameNamespace mocks base method.

func (*MockMetadataManager) UpdateNamespace

func (m *MockMetadataManager) UpdateNamespace(ctx context.Context, request *UpdateNamespaceRequest) error

UpdateNamespace mocks base method.

func (*MockMetadataManager) WatchNamespaces

func (m *MockMetadataManager) WatchNamespaces(ctx context.Context) (<-chan *NamespaceWatchEvent, error)

WatchNamespaces mocks base method.

type MockMetadataManagerMockRecorder

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

MockMetadataManagerMockRecorder is the mock recorder for MockMetadataManager.

func (*MockMetadataManagerMockRecorder) Close

Close indicates an expected call of Close.

func (*MockMetadataManagerMockRecorder) CreateNamespace

func (mr *MockMetadataManagerMockRecorder) CreateNamespace(ctx, request any) *gomock.Call

CreateNamespace indicates an expected call of CreateNamespace.

func (*MockMetadataManagerMockRecorder) DeleteNamespace

func (mr *MockMetadataManagerMockRecorder) DeleteNamespace(ctx, request any) *gomock.Call

DeleteNamespace indicates an expected call of DeleteNamespace.

func (*MockMetadataManagerMockRecorder) DeleteNamespaceByName

func (mr *MockMetadataManagerMockRecorder) DeleteNamespaceByName(ctx, request any) *gomock.Call

DeleteNamespaceByName indicates an expected call of DeleteNamespaceByName.

func (*MockMetadataManagerMockRecorder) GetMetadata

func (mr *MockMetadataManagerMockRecorder) GetMetadata(ctx any) *gomock.Call

GetMetadata indicates an expected call of GetMetadata.

func (*MockMetadataManagerMockRecorder) GetName

GetName indicates an expected call of GetName.

func (*MockMetadataManagerMockRecorder) GetNamespace

func (mr *MockMetadataManagerMockRecorder) GetNamespace(ctx, request any) *gomock.Call

GetNamespace indicates an expected call of GetNamespace.

func (*MockMetadataManagerMockRecorder) InitializeSystemNamespaces

func (mr *MockMetadataManagerMockRecorder) InitializeSystemNamespaces(ctx, currentClusterName any) *gomock.Call

InitializeSystemNamespaces indicates an expected call of InitializeSystemNamespaces.

func (*MockMetadataManagerMockRecorder) ListNamespaces

func (mr *MockMetadataManagerMockRecorder) ListNamespaces(ctx, request any) *gomock.Call

ListNamespaces indicates an expected call of ListNamespaces.

func (*MockMetadataManagerMockRecorder) RenameNamespace

func (mr *MockMetadataManagerMockRecorder) RenameNamespace(ctx, request any) *gomock.Call

RenameNamespace indicates an expected call of RenameNamespace.

func (*MockMetadataManagerMockRecorder) UpdateNamespace

func (mr *MockMetadataManagerMockRecorder) UpdateNamespace(ctx, request any) *gomock.Call

UpdateNamespace indicates an expected call of UpdateNamespace.

func (*MockMetadataManagerMockRecorder) WatchNamespaces

func (mr *MockMetadataManagerMockRecorder) WatchNamespaces(ctx any) *gomock.Call

WatchNamespaces indicates an expected call of WatchNamespaces.

type MockNamespaceReplicationQueue

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

MockNamespaceReplicationQueue is a mock of NamespaceReplicationQueue interface.

func NewMockNamespaceReplicationQueue

func NewMockNamespaceReplicationQueue(ctrl *gomock.Controller) *MockNamespaceReplicationQueue

NewMockNamespaceReplicationQueue creates a new mock instance.

func (*MockNamespaceReplicationQueue) Close

func (m *MockNamespaceReplicationQueue) Close()

Close mocks base method.

func (*MockNamespaceReplicationQueue) DeleteMessageFromDLQ

func (m *MockNamespaceReplicationQueue) DeleteMessageFromDLQ(ctx context.Context, messageID int64) error

DeleteMessageFromDLQ mocks base method.

func (*MockNamespaceReplicationQueue) DeleteMessagesBefore

func (m *MockNamespaceReplicationQueue) DeleteMessagesBefore(ctx context.Context, exclusiveMessageID int64) error

DeleteMessagesBefore mocks base method.

func (*MockNamespaceReplicationQueue) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockNamespaceReplicationQueue) GetAckLevels

func (m *MockNamespaceReplicationQueue) GetAckLevels(ctx context.Context) (map[string]int64, error)

GetAckLevels mocks base method.

func (*MockNamespaceReplicationQueue) GetDLQAckLevel

func (m *MockNamespaceReplicationQueue) GetDLQAckLevel(ctx context.Context) (int64, error)

GetDLQAckLevel mocks base method.

func (*MockNamespaceReplicationQueue) GetMessagesFromDLQ

func (m *MockNamespaceReplicationQueue) GetMessagesFromDLQ(ctx context.Context, firstMessageID, lastMessageID int64, pageSize int, pageToken []byte) ([]*repication.ReplicationTask, []byte, error)

GetMessagesFromDLQ mocks base method.

func (*MockNamespaceReplicationQueue) GetReplicationMessages

func (m *MockNamespaceReplicationQueue) GetReplicationMessages(ctx context.Context, lastMessageID int64, maxCount int) ([]*repication.ReplicationTask, int64, error)

GetReplicationMessages mocks base method.

func (*MockNamespaceReplicationQueue) Publish

Publish mocks base method.

func (*MockNamespaceReplicationQueue) PublishToDLQ

PublishToDLQ mocks base method.

func (*MockNamespaceReplicationQueue) RangeDeleteMessagesFromDLQ

func (m *MockNamespaceReplicationQueue) RangeDeleteMessagesFromDLQ(ctx context.Context, firstMessageID, lastMessageID int64) error

RangeDeleteMessagesFromDLQ mocks base method.

func (*MockNamespaceReplicationQueue) UpdateAckLevel

func (m *MockNamespaceReplicationQueue) UpdateAckLevel(ctx context.Context, lastProcessedMessageID int64, clusterName string) error

UpdateAckLevel mocks base method.

func (*MockNamespaceReplicationQueue) UpdateDLQAckLevel

func (m *MockNamespaceReplicationQueue) UpdateDLQAckLevel(ctx context.Context, lastProcessedMessageID int64) error

UpdateDLQAckLevel mocks base method.

type MockNamespaceReplicationQueueMockRecorder

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

MockNamespaceReplicationQueueMockRecorder is the mock recorder for MockNamespaceReplicationQueue.

func (*MockNamespaceReplicationQueueMockRecorder) Close

Close indicates an expected call of Close.

func (*MockNamespaceReplicationQueueMockRecorder) DeleteMessageFromDLQ

func (mr *MockNamespaceReplicationQueueMockRecorder) DeleteMessageFromDLQ(ctx, messageID any) *gomock.Call

DeleteMessageFromDLQ indicates an expected call of DeleteMessageFromDLQ.

func (*MockNamespaceReplicationQueueMockRecorder) DeleteMessagesBefore

func (mr *MockNamespaceReplicationQueueMockRecorder) DeleteMessagesBefore(ctx, exclusiveMessageID any) *gomock.Call

DeleteMessagesBefore indicates an expected call of DeleteMessagesBefore.

func (*MockNamespaceReplicationQueueMockRecorder) GetAckLevels

GetAckLevels indicates an expected call of GetAckLevels.

func (*MockNamespaceReplicationQueueMockRecorder) GetDLQAckLevel

func (mr *MockNamespaceReplicationQueueMockRecorder) GetDLQAckLevel(ctx any) *gomock.Call

GetDLQAckLevel indicates an expected call of GetDLQAckLevel.

func (*MockNamespaceReplicationQueueMockRecorder) GetMessagesFromDLQ

func (mr *MockNamespaceReplicationQueueMockRecorder) GetMessagesFromDLQ(ctx, firstMessageID, lastMessageID, pageSize, pageToken any) *gomock.Call

GetMessagesFromDLQ indicates an expected call of GetMessagesFromDLQ.

func (*MockNamespaceReplicationQueueMockRecorder) GetReplicationMessages

func (mr *MockNamespaceReplicationQueueMockRecorder) GetReplicationMessages(ctx, lastMessageID, maxCount any) *gomock.Call

GetReplicationMessages indicates an expected call of GetReplicationMessages.

func (*MockNamespaceReplicationQueueMockRecorder) Publish

func (mr *MockNamespaceReplicationQueueMockRecorder) Publish(ctx, task any) *gomock.Call

Publish indicates an expected call of Publish.

func (*MockNamespaceReplicationQueueMockRecorder) PublishToDLQ

func (mr *MockNamespaceReplicationQueueMockRecorder) PublishToDLQ(ctx, task any) *gomock.Call

PublishToDLQ indicates an expected call of PublishToDLQ.

func (*MockNamespaceReplicationQueueMockRecorder) RangeDeleteMessagesFromDLQ

func (mr *MockNamespaceReplicationQueueMockRecorder) RangeDeleteMessagesFromDLQ(ctx, firstMessageID, lastMessageID any) *gomock.Call

RangeDeleteMessagesFromDLQ indicates an expected call of RangeDeleteMessagesFromDLQ.

func (*MockNamespaceReplicationQueueMockRecorder) UpdateAckLevel

func (mr *MockNamespaceReplicationQueueMockRecorder) UpdateAckLevel(ctx, lastProcessedMessageID, clusterName any) *gomock.Call

UpdateAckLevel indicates an expected call of UpdateAckLevel.

func (*MockNamespaceReplicationQueueMockRecorder) UpdateDLQAckLevel

func (mr *MockNamespaceReplicationQueueMockRecorder) UpdateDLQAckLevel(ctx, lastProcessedMessageID any) *gomock.Call

UpdateDLQAckLevel indicates an expected call of UpdateDLQAckLevel.

type MockNexusEndpointManager

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

MockNexusEndpointManager is a mock of NexusEndpointManager interface.

func NewMockNexusEndpointManager

func NewMockNexusEndpointManager(ctrl *gomock.Controller) *MockNexusEndpointManager

NewMockNexusEndpointManager creates a new mock instance.

func (*MockNexusEndpointManager) Close

func (m *MockNexusEndpointManager) Close()

Close mocks base method.

func (*MockNexusEndpointManager) CreateOrUpdateNexusEndpoint

CreateOrUpdateNexusEndpoint mocks base method.

func (*MockNexusEndpointManager) DeleteNexusEndpoint

func (m *MockNexusEndpointManager) DeleteNexusEndpoint(ctx context.Context, request *DeleteNexusEndpointRequest) error

DeleteNexusEndpoint mocks base method.

func (*MockNexusEndpointManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockNexusEndpointManager) GetName

func (m *MockNexusEndpointManager) GetName() string

GetName mocks base method.

func (*MockNexusEndpointManager) GetNexusEndpoint

GetNexusEndpoint mocks base method.

func (*MockNexusEndpointManager) ListNexusEndpoints

ListNexusEndpoints mocks base method.

type MockNexusEndpointManagerMockRecorder

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

MockNexusEndpointManagerMockRecorder is the mock recorder for MockNexusEndpointManager.

func (*MockNexusEndpointManagerMockRecorder) Close

Close indicates an expected call of Close.

func (*MockNexusEndpointManagerMockRecorder) CreateOrUpdateNexusEndpoint

func (mr *MockNexusEndpointManagerMockRecorder) CreateOrUpdateNexusEndpoint(ctx, request any) *gomock.Call

CreateOrUpdateNexusEndpoint indicates an expected call of CreateOrUpdateNexusEndpoint.

func (*MockNexusEndpointManagerMockRecorder) DeleteNexusEndpoint

func (mr *MockNexusEndpointManagerMockRecorder) DeleteNexusEndpoint(ctx, request any) *gomock.Call

DeleteNexusEndpoint indicates an expected call of DeleteNexusEndpoint.

func (*MockNexusEndpointManagerMockRecorder) GetName

GetName indicates an expected call of GetName.

func (*MockNexusEndpointManagerMockRecorder) GetNexusEndpoint

func (mr *MockNexusEndpointManagerMockRecorder) GetNexusEndpoint(ctx, request any) *gomock.Call

GetNexusEndpoint indicates an expected call of GetNexusEndpoint.

func (*MockNexusEndpointManagerMockRecorder) ListNexusEndpoints

func (mr *MockNexusEndpointManagerMockRecorder) ListNexusEndpoints(ctx, request any) *gomock.Call

ListNexusEndpoints indicates an expected call of ListNexusEndpoints.

type MockShardManager

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

MockShardManager is a mock of ShardManager interface.

func NewMockShardManager

func NewMockShardManager(ctrl *gomock.Controller) *MockShardManager

NewMockShardManager creates a new mock instance.

func (*MockShardManager) AssertShardOwnership

func (m *MockShardManager) AssertShardOwnership(ctx context.Context, request *AssertShardOwnershipRequest) error

AssertShardOwnership mocks base method.

func (*MockShardManager) Close

func (m *MockShardManager) Close()

Close mocks base method.

func (*MockShardManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockShardManager) GetName

func (m *MockShardManager) GetName() string

GetName mocks base method.

func (*MockShardManager) GetOrCreateShard

GetOrCreateShard mocks base method.

func (*MockShardManager) UpdateShard

func (m *MockShardManager) UpdateShard(ctx context.Context, request *UpdateShardRequest) error

UpdateShard mocks base method.

type MockShardManagerMockRecorder

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

MockShardManagerMockRecorder is the mock recorder for MockShardManager.

func (*MockShardManagerMockRecorder) AssertShardOwnership

func (mr *MockShardManagerMockRecorder) AssertShardOwnership(ctx, request any) *gomock.Call

AssertShardOwnership indicates an expected call of AssertShardOwnership.

func (*MockShardManagerMockRecorder) Close

Close indicates an expected call of Close.

func (*MockShardManagerMockRecorder) GetName

func (mr *MockShardManagerMockRecorder) GetName() *gomock.Call

GetName indicates an expected call of GetName.

func (*MockShardManagerMockRecorder) GetOrCreateShard

func (mr *MockShardManagerMockRecorder) GetOrCreateShard(ctx, request any) *gomock.Call

GetOrCreateShard indicates an expected call of GetOrCreateShard.

func (*MockShardManagerMockRecorder) UpdateShard

func (mr *MockShardManagerMockRecorder) UpdateShard(ctx, request any) *gomock.Call

UpdateShard indicates an expected call of UpdateShard.

type MockTaskManager

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

MockTaskManager is a mock of TaskManager interface.

func NewMockTaskManager

func NewMockTaskManager(ctrl *gomock.Controller) *MockTaskManager

NewMockTaskManager creates a new mock instance.

func (*MockTaskManager) Close

func (m *MockTaskManager) Close()

Close mocks base method.

func (*MockTaskManager) CompleteTasksLessThan

func (m *MockTaskManager) CompleteTasksLessThan(ctx context.Context, request *CompleteTasksLessThanRequest) (int, error)

CompleteTasksLessThan mocks base method.

func (*MockTaskManager) CountTaskQueuesByBuildId

func (m *MockTaskManager) CountTaskQueuesByBuildId(ctx context.Context, request *CountTaskQueuesByBuildIdRequest) (int, error)

CountTaskQueuesByBuildId mocks base method.

func (*MockTaskManager) CreateTaskQueue

CreateTaskQueue mocks base method.

func (*MockTaskManager) CreateTasks

func (m *MockTaskManager) CreateTasks(ctx context.Context, request *CreateTasksRequest) (*CreateTasksResponse, error)

CreateTasks mocks base method.

func (*MockTaskManager) DeleteTaskQueue

func (m *MockTaskManager) DeleteTaskQueue(ctx context.Context, request *DeleteTaskQueueRequest) error

DeleteTaskQueue mocks base method.

func (*MockTaskManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTaskManager) GetName

func (m *MockTaskManager) GetName() string

GetName mocks base method.

func (*MockTaskManager) GetTaskQueue

func (m *MockTaskManager) GetTaskQueue(ctx context.Context, request *GetTaskQueueRequest) (*GetTaskQueueResponse, error)

GetTaskQueue mocks base method.

func (*MockTaskManager) GetTaskQueueUserData

GetTaskQueueUserData mocks base method.

func (*MockTaskManager) GetTaskQueuesByBuildId

func (m *MockTaskManager) GetTaskQueuesByBuildId(ctx context.Context, request *GetTaskQueuesByBuildIdRequest) ([]string, error)

GetTaskQueuesByBuildId mocks base method.

func (*MockTaskManager) GetTasks

func (m *MockTaskManager) GetTasks(ctx context.Context, request *GetTasksRequest) (*GetTasksResponse, error)

GetTasks mocks base method.

func (*MockTaskManager) ListTaskQueue

func (m *MockTaskManager) ListTaskQueue(ctx context.Context, request *ListTaskQueueRequest) (*ListTaskQueueResponse, error)

ListTaskQueue mocks base method.

func (*MockTaskManager) ListTaskQueueUserDataEntries

ListTaskQueueUserDataEntries mocks base method.

func (*MockTaskManager) UpdateTaskQueue

UpdateTaskQueue mocks base method.

func (*MockTaskManager) UpdateTaskQueueUserData

func (m *MockTaskManager) UpdateTaskQueueUserData(ctx context.Context, request *UpdateTaskQueueUserDataRequest) error

UpdateTaskQueueUserData mocks base method.

type MockTaskManagerMockRecorder

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

MockTaskManagerMockRecorder is the mock recorder for MockTaskManager.

func (*MockTaskManagerMockRecorder) Close

Close indicates an expected call of Close.

func (*MockTaskManagerMockRecorder) CompleteTasksLessThan

func (mr *MockTaskManagerMockRecorder) CompleteTasksLessThan(ctx, request any) *gomock.Call

CompleteTasksLessThan indicates an expected call of CompleteTasksLessThan.

func (*MockTaskManagerMockRecorder) CountTaskQueuesByBuildId

func (mr *MockTaskManagerMockRecorder) CountTaskQueuesByBuildId(ctx, request any) *gomock.Call

CountTaskQueuesByBuildId indicates an expected call of CountTaskQueuesByBuildId.

func (*MockTaskManagerMockRecorder) CreateTaskQueue

func (mr *MockTaskManagerMockRecorder) CreateTaskQueue(ctx, request any) *gomock.Call

CreateTaskQueue indicates an expected call of CreateTaskQueue.

func (*MockTaskManagerMockRecorder) CreateTasks

func (mr *MockTaskManagerMockRecorder) CreateTasks(ctx, request any) *gomock.Call

CreateTasks indicates an expected call of CreateTasks.

func (*MockTaskManagerMockRecorder) DeleteTaskQueue

func (mr *MockTaskManagerMockRecorder) DeleteTaskQueue(ctx, request any) *gomock.Call

DeleteTaskQueue indicates an expected call of DeleteTaskQueue.

func (*MockTaskManagerMockRecorder) GetName

func (mr *MockTaskManagerMockRecorder) GetName() *gomock.Call

GetName indicates an expected call of GetName.

func (*MockTaskManagerMockRecorder) GetTaskQueue

func (mr *MockTaskManagerMockRecorder) GetTaskQueue(ctx, request any) *gomock.Call

GetTaskQueue indicates an expected call of GetTaskQueue.

func (*MockTaskManagerMockRecorder) GetTaskQueueUserData

func (mr *MockTaskManagerMockRecorder) GetTaskQueueUserData(ctx, request any) *gomock.Call

GetTaskQueueUserData indicates an expected call of GetTaskQueueUserData.

func (*MockTaskManagerMockRecorder) GetTaskQueuesByBuildId

func (mr *MockTaskManagerMockRecorder) GetTaskQueuesByBuildId(ctx, request any) *gomock.Call

GetTaskQueuesByBuildId indicates an expected call of GetTaskQueuesByBuildId.

func (*MockTaskManagerMockRecorder) GetTasks

func (mr *MockTaskManagerMockRecorder) GetTasks(ctx, request any) *gomock.Call

GetTasks indicates an expected call of GetTasks.

func (*MockTaskManagerMockRecorder) ListTaskQueue

func (mr *MockTaskManagerMockRecorder) ListTaskQueue(ctx, request any) *gomock.Call

ListTaskQueue indicates an expected call of ListTaskQueue.

func (*MockTaskManagerMockRecorder) ListTaskQueueUserDataEntries

func (mr *MockTaskManagerMockRecorder) ListTaskQueueUserDataEntries(ctx, request any) *gomock.Call

ListTaskQueueUserDataEntries indicates an expected call of ListTaskQueueUserDataEntries.

func (*MockTaskManagerMockRecorder) UpdateTaskQueue

func (mr *MockTaskManagerMockRecorder) UpdateTaskQueue(ctx, request any) *gomock.Call

UpdateTaskQueue indicates an expected call of UpdateTaskQueue.

func (*MockTaskManagerMockRecorder) UpdateTaskQueueUserData

func (mr *MockTaskManagerMockRecorder) UpdateTaskQueueUserData(ctx, request any) *gomock.Call

UpdateTaskQueueUserData indicates an expected call of UpdateTaskQueueUserData.

type MutableStateStatistics

type MutableStateStatistics struct {
	TotalSize         int
	HistoryStatistics *HistoryStatistics

	// Breakdown of size into more granular stats
	ExecutionInfoSize  int
	ExecutionStateSize int

	ActivityInfoSize      int
	TimerInfoSize         int
	ChildInfoSize         int
	RequestCancelInfoSize int
	SignalInfoSize        int
	SignalRequestIDSize   int
	BufferedEventsSize    int
	ChasmTotalSize        int // total size of all CHASM nodes within a record

	// Item count for various information captured within mutable state
	ActivityInfoCount      int
	TimerInfoCount         int
	ChildInfoCount         int
	RequestCancelInfoCount int
	SignalInfoCount        int
	SignalRequestIDCount   int
	BufferedEventsCount    int
	TaskCountByCategory    map[string]int
	UpdateInfoCount        int

	// Total item count for various information captured within mutable state
	TotalActivityCount              int64
	TotalUserTimerCount             int64
	TotalChildExecutionCount        int64
	TotalRequestCancelExternalCount int64
	TotalSignalExternalCount        int64
	TotalSignalCount                int64
	TotalUpdateCount                int64
}

MutableStateStatistics is the size stats for MutableState

type NamespaceReplicationQueue

type NamespaceReplicationQueue interface {
	Closeable
	Publish(ctx context.Context, task *replicationspb.ReplicationTask) error
	GetReplicationMessages(
		ctx context.Context,
		lastMessageID int64,
		maxCount int,
	) ([]*replicationspb.ReplicationTask, int64, error)
	UpdateAckLevel(ctx context.Context, lastProcessedMessageID int64, clusterName string) error
	GetAckLevels(ctx context.Context) (map[string]int64, error)
	DeleteMessagesBefore(ctx context.Context, exclusiveMessageID int64) error

	PublishToDLQ(ctx context.Context, task *replicationspb.ReplicationTask) error
	GetMessagesFromDLQ(
		ctx context.Context,
		firstMessageID int64,
		lastMessageID int64,
		pageSize int,
		pageToken []byte,
	) ([]*replicationspb.ReplicationTask, []byte, error)
	UpdateDLQAckLevel(ctx context.Context, lastProcessedMessageID int64) error
	GetDLQAckLevel(ctx context.Context) (int64, error)

	RangeDeleteMessagesFromDLQ(ctx context.Context, firstMessageID int64, lastMessageID int64) error
	DeleteMessageFromDLQ(ctx context.Context, messageID int64) error
}

NamespaceReplicationQueue is used to publish and list namespace replication tasks

func NewNamespaceReplicationQueue

func NewNamespaceReplicationQueue(
	queue Queue,
	serializer serialization.Serializer,
	clusterName string,
	metricsHandler metrics.Handler,
	logger log.Logger,
) (NamespaceReplicationQueue, error)

NewNamespaceReplicationQueue creates a new NamespaceReplicationQueue instance

type NamespaceWatchEvent

type NamespaceWatchEvent struct {
	Type        NamespaceWatchEventType
	Response    *GetNamespaceResponse
	NamespaceID namespace.ID
	Err         error
}

type NamespaceWatchEventType

type NamespaceWatchEventType int
const (
	NamespaceWatchEventTypeCreate NamespaceWatchEventType = iota
	NamespaceWatchEventTypeUpdate
	NamespaceWatchEventTypeDelete
)

type NexusEndpointManager

type NexusEndpointManager interface {
	Closeable
	GetName() string
	GetNexusEndpoint(ctx context.Context, request *GetNexusEndpointRequest) (*persistencespb.NexusEndpointEntry, error)
	ListNexusEndpoints(ctx context.Context, request *ListNexusEndpointsRequest) (*ListNexusEndpointsResponse, error)
	CreateOrUpdateNexusEndpoint(ctx context.Context, request *CreateOrUpdateNexusEndpointRequest) (*CreateOrUpdateNexusEndpointResponse, error)
	DeleteNexusEndpoint(ctx context.Context, request *DeleteNexusEndpointRequest) error
}

NexusEndpointManager is used to manage CRUD for Nexus endpoints.

func NewNexusEndpointManager

func NewNexusEndpointManager(
	persistence NexusEndpointStore,
	serializer serialization.Serializer,
	logger log.Logger,
) NexusEndpointManager

func NewNexusEndpointPersistenceMetricsClient

func NewNexusEndpointPersistenceMetricsClient(persistence NexusEndpointManager, metricsHandler metrics.Handler, healthSignals HealthSignalAggregator, logger log.Logger, enableDataLossMetrics dynamicconfig.BoolPropertyFn) NexusEndpointManager

NewNexusEndpointPersistenceMetricsClient creates a NexusEndpointManager to manage nexus endpoints

func NewNexusEndpointPersistenceRateLimitedClient

func NewNexusEndpointPersistenceRateLimitedClient(
	persistence NexusEndpointManager,
	systemRateLimiter quotas.RequestRateLimiter,
	namespaceRateLimiter quotas.RequestRateLimiter,
	shardRateLimiter quotas.RequestRateLimiter,
	logger log.Logger,
) NexusEndpointManager

NewNexusEndpointPersistenceRateLimitedClient creates a NexusEndpointManager to manage nexus endpoints

func NewNexusEndpointPersistenceRetryableClient

func NewNexusEndpointPersistenceRetryableClient(
	persistence NexusEndpointManager,
	policy backoff.RetryPolicy,
	isRetryable backoff.IsRetryable,
) NexusEndpointManager

NewNexusEndpointPersistenceRetryableClient creates a NexusEndpointManager client to manage nexus endpoints

type NexusEndpointStore

type NexusEndpointStore interface {
	Closeable
	GetName() string
	CreateOrUpdateNexusEndpoint(ctx context.Context, request *InternalCreateOrUpdateNexusEndpointRequest) error
	DeleteNexusEndpoint(ctx context.Context, request *DeleteNexusEndpointRequest) error
	GetNexusEndpoint(ctx context.Context, request *GetNexusEndpointRequest) (*InternalNexusEndpoint, error)
	ListNexusEndpoints(ctx context.Context, request *ListNexusEndpointsRequest) (*InternalListNexusEndpointsResponse, error)
}

NexusEndpointStore is a store for managing Nexus endpoints

type PersistedTaskQueueInfo

type PersistedTaskQueueInfo struct {
	Data    *persistencespb.TaskQueueInfo
	RangeID int64
}

type PruneClusterMembershipRequest

type PruneClusterMembershipRequest struct {
	MaxRecordsPruned int
}

PruneClusterMembershipRequest is the request to PruneClusterMembership

type PutReplicationTaskToDLQRequest

type PutReplicationTaskToDLQRequest struct {
	ShardID           int32
	SourceClusterName string
	TaskInfo          *persistencespb.ReplicationTaskInfo
}

PutReplicationTaskToDLQRequest is used to put a replication task to dlq

type Queue

type Queue interface {
	Closeable
	Init(ctx context.Context, blob *commonpb.DataBlob) error
	EnqueueMessage(ctx context.Context, blob *commonpb.DataBlob) error
	ReadMessages(ctx context.Context, lastMessageID int64, maxCount int) ([]*QueueMessage, error)
	DeleteMessagesBefore(ctx context.Context, messageID int64) error
	UpdateAckLevel(ctx context.Context, metadata *InternalQueueMetadata) error
	GetAckLevels(ctx context.Context) (*InternalQueueMetadata, error)

	EnqueueMessageToDLQ(ctx context.Context, blob *commonpb.DataBlob) (int64, error)
	ReadMessagesFromDLQ(ctx context.Context, firstMessageID int64, lastMessageID int64, pageSize int, pageToken []byte) ([]*QueueMessage, []byte, error)
	DeleteMessageFromDLQ(ctx context.Context, messageID int64) error
	RangeDeleteMessagesFromDLQ(ctx context.Context, firstMessageID int64, lastMessageID int64) error
	UpdateDLQAckLevel(ctx context.Context, metadata *InternalQueueMetadata) error
	GetDLQAckLevels(ctx context.Context) (*InternalQueueMetadata, error)
}

Queue is a store to enqueue and get messages

func NewQueuePersistenceMetricsClient

func NewQueuePersistenceMetricsClient(persistence Queue, metricsHandler metrics.Handler, healthSignals HealthSignalAggregator, logger log.Logger, enableDataLossMetrics dynamicconfig.BoolPropertyFn) Queue

NewQueuePersistenceMetricsClient creates a client to manage queue

func NewQueuePersistenceRateLimitedClient

func NewQueuePersistenceRateLimitedClient(
	persistence Queue,
	systemRateLimiter quotas.RequestRateLimiter,
	namespaceRateLimiter quotas.RequestRateLimiter,
	shardRateLimiter quotas.RequestRateLimiter,
	logger log.Logger,
) Queue

NewQueuePersistenceRateLimitedClient creates a client to manage queue

func NewQueuePersistenceRetryableClient

func NewQueuePersistenceRetryableClient(
	persistence Queue,
	policy backoff.RetryPolicy,
	isRetryable backoff.IsRetryable,
) Queue

NewQueuePersistenceRetryableClient creates a client to manage queue

type QueueInfo

type QueueInfo struct {
	QueueName     string
	MessageCount  int64
	LastMessageID int64
}

type QueueKey

type QueueKey struct {
	QueueType     QueueV2Type
	Category      tasks.Category
	SourceCluster string
	// TargetCluster is only used for cross-cluster replication tasks.
	TargetCluster string
}

QueueKey identifies a history task queue. It is converted to a queue name using the GetQueueName method.

func (QueueKey) GetQueueName

func (k QueueKey) GetQueueName() string

type QueueMessage

type QueueMessage struct {
	QueueType QueueType `json:"queue_type"`
	ID        int64     `json:"message_id"`
	Data      []byte    `json:"message_payload"`
	Encoding  string    `json:"message_encoding"`
}

QueueMessage is the message that stores in the queue

type QueueType

type QueueType int32

QueueType is an enum that represents various queue types in persistence

const (
	NamespaceReplicationQueueType QueueType = iota + 1
)

type QueueV2

type QueueV2 interface {
	// EnqueueMessage adds a message to the back of the queue.
	EnqueueMessage(
		ctx context.Context,
		request *InternalEnqueueMessageRequest,
	) (*InternalEnqueueMessageResponse, error)
	// ReadMessages returns messages in order of increasing message ID.
	ReadMessages(
		ctx context.Context,
		request *InternalReadMessagesRequest,
	) (*InternalReadMessagesResponse, error)
	// CreateQueue creates a new queue. An error will be returned if the queue already exists. In addition, an error
	// will be returned if you attempt to operate on a queue with something like EnqueueMessage or ReadMessages
	// before the queue is created.
	CreateQueue(
		ctx context.Context,
		request *InternalCreateQueueRequest,
	) (*InternalCreateQueueResponse, error)
	RangeDeleteMessages(
		ctx context.Context,
		request *InternalRangeDeleteMessagesRequest,
	) (*InternalRangeDeleteMessagesResponse, error)
	ListQueues(
		ctx context.Context,
		request *InternalListQueuesRequest,
	) (*InternalListQueuesResponse, error)
}

QueueV2 is an interface for a generic FIFO queue. It should eventually replace the Queue interface. Why do we need this migration? The main problem is very simple. The `queue_metadata` table in Cassandra has a primary key of (queue_type). This means that we can only have one queue of each type. This is a problem because we want to have multiple queues of the same type, but with different names. For example, we want to have a DLQ for replication tasks from one cluster to another, and cluster names are dynamic, so we can't create separate static queue types for each cluster. The solution is to add a queue_name column to the table, and make the primary key (queue_type, queue_name). This allows us to have multiple queues of the same type, but with different names. Since the new table (which is called `queues` in Cassandra), supports dynamic names, the interface built around it should also support dynamic names. This is why we need a new interface. There are other types built on top of this up the stack, like HistoryTaskQueueManager, for which the same principle of needing a new type because we now support dynamic names applies.

type QueueV2Message

type QueueV2Message struct {
	MetaData MessageMetadata
	Data     *commonpb.DataBlob
}

type QueueV2Type

type QueueV2Type int
const (
	QueueTypeUnspecified   QueueV2Type = 0
	QueueTypeHistoryNormal QueueV2Type = 1
	QueueTypeHistoryDLQ    QueueV2Type = 2

	// FirstQueueMessageID is the ID of the first message written to a queue partition.
	FirstQueueMessageID = 0
)

type RangeCompleteHistoryTasksRequest

type RangeCompleteHistoryTasksRequest struct {
	ShardID             int32
	TaskCategory        tasks.Category
	InclusiveMinTaskKey tasks.Key
	ExclusiveMaxTaskKey tasks.Key
}

RangeCompleteHistoryTasksRequest deletes a range of history tasks Either max TaskID or FireTime is required depending on the task category type. Min TaskID or FireTime is optional.

type RangeDeleteReplicationTaskFromDLQRequest

type RangeDeleteReplicationTaskFromDLQRequest struct {
	RangeCompleteHistoryTasksRequest

	SourceClusterName string
}

RangeDeleteReplicationTaskFromDLQRequest is used to delete replication tasks from DLQ

type RawHistoryTask

type RawHistoryTask struct {
	MessageMetadata MessageMetadata
	Payload         *persistencespb.HistoryTask
}

type ReadHistoryBranchByBatchResponse

type ReadHistoryBranchByBatchResponse struct {
	// History events by batch
	History []*historypb.History
	// TransactionID for relevant History batch
	TransactionIDs []int64
	// Token to read next page if there are more events beyond page size.
	// Use this to set NextPageToken on ReadHistoryBranchRequest to read the next page.
	// Empty means we have reached the last page, not need to continue
	NextPageToken []byte
	// Size of history read from store
	Size int
}

ReadHistoryBranchByBatchResponse is the response to ReadHistoryBranchRequest

type ReadHistoryBranchRequest

type ReadHistoryBranchRequest struct {
	// The shard to get history branch data
	ShardID int32
	// The branch to be read
	BranchToken []byte
	// Get the history nodes from MinEventID. Inclusive.
	MinEventID int64
	// Get the history nodes upto MaxEventID.  Exclusive.
	MaxEventID int64
	// Maximum number of batches of events per page. Not that number of events in a batch >=1, it is not number of events per page.
	// However for a single page, it is also possible that the returned events is less than PageSize (event zero events) due to stale events.
	PageSize int
	// Token to continue reading next page of history append transactions.  Pass in empty slice for first page
	NextPageToken []byte
}

ReadHistoryBranchRequest is used to read a history branch

type ReadHistoryBranchResponse

type ReadHistoryBranchResponse struct {
	// History events
	HistoryEvents []*historypb.HistoryEvent
	// Token to read next page if there are more events beyond page size.
	// Use this to set NextPageToken on ReadHistoryBranchRequest to read the next page.
	// Empty means we have reached the last page, not need to continue
	NextPageToken []byte
	// Size of history read from store
	Size int
}

ReadHistoryBranchResponse is the response to ReadHistoryBranchRequest

type ReadHistoryBranchReverseRequest

type ReadHistoryBranchReverseRequest struct {
	// The shard to get history branch data
	ShardID int32
	// The branch to be read
	BranchToken []byte
	// Get the history nodes upto MaxEventID.  Exclusive.
	MaxEventID int64
	// Maximum number of batches of events per page. Not that number of events in a batch >=1, it is not number of events per page.
	// However for a single page, it is also possible that the returned events is less than PageSize (event zero events) due to stale events.
	PageSize int
	// LastFirstTransactionID specified in mutable state. Only used for reading in reverse order.
	LastFirstTransactionID int64
	// Token to continue reading next page of history append transactions.  Pass in empty slice for first page
	NextPageToken []byte
}

ReadHistoryBranchRequest is used to read a history branch

type ReadHistoryBranchReverseResponse

type ReadHistoryBranchReverseResponse struct {
	// History events
	HistoryEvents []*historypb.HistoryEvent
	// Token to read next page if there are more events beyond page size.
	// Use this to set NextPageToken on ReadHistoryBranchRequest to read the next page.
	// Empty means we have reached the last page, not need to continue
	NextPageToken []byte
	// Size of history read from store
	Size int
}

ReadHistoryBranchResponse is the response to ReadHistoryBranchRequest

type ReadRawHistoryBranchResponse

type ReadRawHistoryBranchResponse struct {
	// HistoryEventBlobs history event blobs
	HistoryEventBlobs []*commonpb.DataBlob
	// NodeIDs is the first event id of each history blob
	NodeIDs []int64
	// Token to read next page if there are more events beyond page size.
	// Use this to set NextPageToken on ReadHistoryBranchRequest to read the next page.
	// Empty means we have reached the last page, not need to continue
	NextPageToken []byte
	// Size of history read from store
	Size int
}

ReadRawHistoryBranchResponse is the response to ReadHistoryBranchRequest

type ReadRawTasksRequest

type ReadRawTasksRequest = ReadTasksRequest

type ReadRawTasksResponse

type ReadRawTasksResponse struct {
	Tasks         []RawHistoryTask
	NextPageToken []byte
}

type ReadTasksRequest

type ReadTasksRequest struct {
	QueueKey      QueueKey
	PageSize      int
	NextPageToken []byte
}

type ReadTasksResponse

type ReadTasksResponse struct {
	Tasks         []HistoryTask
	NextPageToken []byte
}

type RenameNamespaceRequest

type RenameNamespaceRequest struct {
	PreviousName string
	NewName      string
}

RenameNamespaceRequest is used to rename namespace.

type SaveClusterMetadataRequest

type SaveClusterMetadataRequest struct {
	*persistencespb.ClusterMetadata
	Version int64
}

SaveClusterMetadataRequest is the request to SaveClusterMetadata

type ServiceType

type ServiceType int
const (
	All ServiceType = iota
	Frontend
	History
	Matching
	Worker
	InternalFrontend
)

type SetWorkflowExecutionRequest

type SetWorkflowExecutionRequest struct {
	ShardID int32
	RangeID int64

	ArchetypeID chasm.ArchetypeID

	SetWorkflowSnapshot WorkflowSnapshot
}

SetWorkflowExecutionRequest is used to overwrite the info of a workflow execution

type SetWorkflowExecutionResponse

type SetWorkflowExecutionResponse struct {
}

SetWorkflowExecutionResponse is the response to SetWorkflowExecutionRequest

type ShardAlreadyExistError

type ShardAlreadyExistError struct {
	Msg string
}

ShardAlreadyExistError is returned when conditionally creating a shard fails

func (*ShardAlreadyExistError) Error

func (e *ShardAlreadyExistError) Error() string

type ShardManager

type ShardManager interface {
	Closeable
	GetName() string

	GetOrCreateShard(ctx context.Context, request *GetOrCreateShardRequest) (*GetOrCreateShardResponse, error)
	UpdateShard(ctx context.Context, request *UpdateShardRequest) error
	AssertShardOwnership(ctx context.Context, request *AssertShardOwnershipRequest) error
}

ShardManager is used to manage all shards

func NewShardManager

func NewShardManager(
	shardStore ShardStore,
	serializer serialization.Serializer,
) ShardManager

NewShardManager create a new instance of ShardManager

func NewShardPersistenceMetricsClient

func NewShardPersistenceMetricsClient(persistence ShardManager, metricsHandler metrics.Handler, healthSignals HealthSignalAggregator, logger log.Logger, enableDataLossMetrics dynamicconfig.BoolPropertyFn) ShardManager

NewShardPersistenceMetricsClient creates a client to manage shards

func NewShardPersistenceRateLimitedClient

func NewShardPersistenceRateLimitedClient(
	persistence ShardManager,
	rateLimiter quotas.RequestRateLimiter,
	namespaceRateLimiter quotas.RequestRateLimiter,
	shardRateLimiter quotas.RequestRateLimiter,
	logger log.Logger,
) ShardManager

NewShardPersistenceRateLimitedClient creates a client to manage shards

func NewShardPersistenceRetryableClient

func NewShardPersistenceRetryableClient(
	persistence ShardManager,
	policy backoff.RetryPolicy,
	isRetryable backoff.IsRetryable,
) ShardManager

NewShardPersistenceRetryableClient creates a client to manage shards

type ShardOwnershipLostError

type ShardOwnershipLostError struct {
	ShardID int32
	Msg     string
}

ShardOwnershipLostError is returned when conditional update fails due to RangeID for the shard

func (*ShardOwnershipLostError) Error

func (e *ShardOwnershipLostError) Error() string

type ShardStore

type ShardStore interface {
	Closeable
	GetName() string
	GetClusterName() string
	GetOrCreateShard(ctx context.Context, request *InternalGetOrCreateShardRequest) (*InternalGetOrCreateShardResponse, error)
	UpdateShard(ctx context.Context, request *InternalUpdateShardRequest) error
	AssertShardOwnership(ctx context.Context, request *AssertShardOwnershipRequest) error
}

ShardStore is a lower level of ShardManager

type SingleTaskQueueUserDataUpdate

type SingleTaskQueueUserDataUpdate struct {
	UserData        *persistencespb.VersionedTaskQueueUserData
	BuildIdsAdded   []string
	BuildIdsRemoved []string
	// If Applied is non-nil, and this single update succeeds (while others may have
	// failed), then it will be set to true.
	Applied *bool
	// If Conflicting is non-nil, and this single update fails due to a version conflict,
	// then it will be set to true. Conflicting updates should not be retried.
	// Note that even if Conflicting is not set to true, the update may still be
	// conflicting, because persistence implementations may only be able to identify the
	// first conflict in a set.
	Conflicting *bool
}

type TaskManager

type TaskManager interface {
	Closeable
	GetName() string
	CreateTaskQueue(ctx context.Context, request *CreateTaskQueueRequest) (*CreateTaskQueueResponse, error)
	UpdateTaskQueue(ctx context.Context, request *UpdateTaskQueueRequest) (*UpdateTaskQueueResponse, error)
	GetTaskQueue(ctx context.Context, request *GetTaskQueueRequest) (*GetTaskQueueResponse, error)
	ListTaskQueue(ctx context.Context, request *ListTaskQueueRequest) (*ListTaskQueueResponse, error)
	DeleteTaskQueue(ctx context.Context, request *DeleteTaskQueueRequest) error
	CreateTasks(ctx context.Context, request *CreateTasksRequest) (*CreateTasksResponse, error)
	GetTasks(ctx context.Context, request *GetTasksRequest) (*GetTasksResponse, error)
	// CompleteTasksLessThan completes tasks less than or equal to the given task id
	// This API takes a limit parameter which specifies the count of maxRows that
	// can be deleted. This parameter may be ignored by the underlying storage, but
	// its mandatory to specify it. On success this method returns the number of rows
	// actually deleted. If the underlying storage doesn't support "limit", all rows
	// less than or equal to taskID will be deleted.
	// On success, this method returns either:
	//  - UnknownNumRowsAffected (this means all rows below value are deleted)
	//  - number of rows deleted, which may be equal to limit
	CompleteTasksLessThan(ctx context.Context, request *CompleteTasksLessThanRequest) (int, error)

	// GetTaskQueueUserData gets versioned user data.
	// This data would only exist if a user uses APIs that generate it, such as the worker versioning related APIs.
	// The caller should be prepared to gracefully handle the "NotFound" service error.
	GetTaskQueueUserData(ctx context.Context, request *GetTaskQueueUserDataRequest) (*GetTaskQueueUserDataResponse, error)
	// UpdateTaskQueueUserData updates the user data for a set of task queues in one namespace.
	// The request takes the _current_ known version along with the data to update.
	// The caller should +1 increment the cached version number if this call succeeds.
	// For efficiency, the store should attempt to perform these updates in as few
	// transactions as possible.
	// Returns an error if any individual update fails. The Applied/Conflicting fields of
	// the individual updates may provide more information in that case.
	UpdateTaskQueueUserData(ctx context.Context, request *UpdateTaskQueueUserDataRequest) error
	ListTaskQueueUserDataEntries(ctx context.Context, request *ListTaskQueueUserDataEntriesRequest) (*ListTaskQueueUserDataEntriesResponse, error)
	GetTaskQueuesByBuildId(ctx context.Context, request *GetTaskQueuesByBuildIdRequest) ([]string, error)
	CountTaskQueuesByBuildId(ctx context.Context, request *CountTaskQueuesByBuildIdRequest) (int, error)
}

TaskManager is used to manage tasks and task queues

func NewTaskManager

func NewTaskManager(
	store TaskStore,
	serializer serialization.Serializer,
) TaskManager

NewTaskManager creates a new instance of TaskManager

func NewTaskPersistenceMetricsClient

func NewTaskPersistenceMetricsClient(persistence TaskManager, metricsHandler metrics.Handler, healthSignals HealthSignalAggregator, logger log.Logger, enableDataLossMetrics dynamicconfig.BoolPropertyFn) TaskManager

NewTaskPersistenceMetricsClient creates a client to manage tasks

func NewTaskPersistenceRateLimitedClient

func NewTaskPersistenceRateLimitedClient(
	persistence TaskManager,
	systemRateLimiter quotas.RequestRateLimiter,
	namespaceRateLimiter quotas.RequestRateLimiter,
	shardRateLimiter quotas.RequestRateLimiter,
	logger log.Logger,
) TaskManager

NewTaskPersistenceRateLimitedClient creates a client to manage tasks

func NewTaskPersistenceRetryableClient

func NewTaskPersistenceRetryableClient(
	persistence TaskManager,
	policy backoff.RetryPolicy,
	isRetryable backoff.IsRetryable,
) TaskManager

NewTaskPersistenceRetryableClient creates a client to manage tasks

type TaskQueueKey

type TaskQueueKey struct {
	NamespaceID   string
	TaskQueueName string
	TaskQueueType enumspb.TaskQueueType
}

TaskQueueKey is the struct used to identity TaskQueues

type TaskQueueUserDataEntry

type TaskQueueUserDataEntry struct {
	TaskQueue string
	UserData  *persistencespb.VersionedTaskQueueUserData
}

type TaskStore

type TaskStore interface {
	Closeable
	GetName() string

	CreateTaskQueue(ctx context.Context, request *InternalCreateTaskQueueRequest) error
	GetTaskQueue(ctx context.Context, request *InternalGetTaskQueueRequest) (*InternalGetTaskQueueResponse, error)
	UpdateTaskQueue(ctx context.Context, request *InternalUpdateTaskQueueRequest) (*UpdateTaskQueueResponse, error)
	ListTaskQueue(ctx context.Context, request *ListTaskQueueRequest) (*InternalListTaskQueueResponse, error)
	DeleteTaskQueue(ctx context.Context, request *DeleteTaskQueueRequest) error

	CreateTasks(ctx context.Context, request *InternalCreateTasksRequest) (*CreateTasksResponse, error)
	GetTasks(ctx context.Context, request *GetTasksRequest) (*InternalGetTasksResponse, error)
	CompleteTasksLessThan(ctx context.Context, request *CompleteTasksLessThanRequest) (int, error)

	GetTaskQueueUserData(ctx context.Context, request *GetTaskQueueUserDataRequest) (*InternalGetTaskQueueUserDataResponse, error)
	UpdateTaskQueueUserData(ctx context.Context, request *InternalUpdateTaskQueueUserDataRequest) error
	ListTaskQueueUserDataEntries(ctx context.Context, request *ListTaskQueueUserDataEntriesRequest) (*InternalListTaskQueueUserDataEntriesResponse, error)
	GetTaskQueuesByBuildId(ctx context.Context, request *GetTaskQueuesByBuildIdRequest) ([]string, error)
	CountTaskQueuesByBuildId(ctx context.Context, request *CountTaskQueuesByBuildIdRequest) (int, error)
}

TaskStore is a lower level of TaskManager

type TimeoutError

type TimeoutError struct {
	Msg string
}

TimeoutError is returned when a write operation fails due to a timeout

func (*TimeoutError) Error

func (e *TimeoutError) Error() string

type TransactionSizeLimitError

type TransactionSizeLimitError struct {
	Msg string
}

TransactionSizeLimitError is returned when the transaction size is too large

func (*TransactionSizeLimitError) Error

func (e *TransactionSizeLimitError) Error() string

type TrimHistoryBranchRequest

type TrimHistoryBranchRequest struct {
	// The shard to delete history branch data
	ShardID int32
	// branch to be validated & trimmed
	BranchToken []byte
	// known valid node ID
	NodeID int64
	// known valid transaction ID
	TransactionID int64
}

TrimHistoryBranchRequest is used to validate & trim a history branch

type TrimHistoryBranchResponse

type TrimHistoryBranchResponse struct {
}

TrimHistoryBranchResponse is the response to TrimHistoryBranchRequest

type UpdateNamespaceRequest

type UpdateNamespaceRequest struct {
	Namespace           *persistencespb.NamespaceDetail
	IsGlobalNamespace   bool
	NotificationVersion int64
}

UpdateNamespaceRequest is used to update namespace

type UpdateShardRequest

type UpdateShardRequest struct {
	ShardInfo       *persistencespb.ShardInfo
	PreviousRangeID int64
}

UpdateShardRequest is used to update shard information

type UpdateTaskQueueRequest

type UpdateTaskQueueRequest struct {
	RangeID       int64
	TaskQueueInfo *persistencespb.TaskQueueInfo

	PrevRangeID int64
}

UpdateTaskQueueRequest is used to update task queue implementation information

type UpdateTaskQueueResponse

type UpdateTaskQueueResponse struct {
}

UpdateTaskQueueResponse is the response to UpdateTaskQueue

type UpdateTaskQueueUserDataRequest

type UpdateTaskQueueUserDataRequest struct {
	NamespaceID string
	Updates     map[string]*SingleTaskQueueUserDataUpdate // key is task queue name
}

UpdateTaskQueueUserDataRequest is the input type for the UpdateTaskQueueUserData API. This updates user data for multiple task queues in one namespace.

type UpdateWorkflowExecutionRequest

type UpdateWorkflowExecutionRequest struct {
	ShardID int32
	RangeID int64

	Mode UpdateWorkflowMode

	ArchetypeID chasm.ArchetypeID

	UpdateWorkflowMutation WorkflowMutation
	UpdateWorkflowEvents   []*WorkflowEvents
	NewWorkflowSnapshot    *WorkflowSnapshot
	NewWorkflowEvents      []*WorkflowEvents
}

UpdateWorkflowExecutionRequest is used to update a workflow execution

type UpdateWorkflowExecutionResponse

type UpdateWorkflowExecutionResponse struct {
	UpdateMutableStateStats MutableStateStatistics
	NewMutableStateStats    *MutableStateStatistics
}

UpdateWorkflowExecutionResponse is response for UpdateWorkflowExecutionRequest

type UpdateWorkflowMode

type UpdateWorkflowMode int

UpdateWorkflowMode update mode

const (
	// UpdateWorkflowModeUpdateCurrent update workflow, including current record
	// NOTE: update on current record is a condition update
	UpdateWorkflowModeUpdateCurrent UpdateWorkflowMode = iota
	// UpdateWorkflowModeBypassCurrent update workflow, without current record
	// NOTE: current record CANNOT point to the workflow to be updated
	UpdateWorkflowModeBypassCurrent
	// UpdateWorkflowModeIgnoreCurrent update workflow, without checking or update current record.
	// This mode should only be used when we don't know if the workflow being updated is the current workflow or not in DB.
	// For example, when updating a closed workflow, it may or may not be the current workflow.
	// This is similar to SetWorkflowExecution, but UpdateWorkflowExecution with this mode persists the workflow as a mutation,
	// instead of a snapshot.
	UpdateWorkflowModeIgnoreCurrent
)

Update Workflow Execution Mode

type UpsertClusterMembershipRequest

type UpsertClusterMembershipRequest struct {
	Role         ServiceType
	HostID       []byte
	RPCAddress   net.IP
	RPCPort      uint16
	SessionStart time.Time
	RecordExpiry time.Duration
}

UpsertClusterMembershipRequest is the request to UpsertClusterMembership

type WorkflowConditionFailedError

type WorkflowConditionFailedError struct {
	Msg             string
	NextEventID     int64
	DBRecordVersion int64
}

WorkflowConditionFailedError represents a failed conditional update for workflow record

func (*WorkflowConditionFailedError) Error

type WorkflowEvents

type WorkflowEvents struct {
	NamespaceID string
	WorkflowID  string
	RunID       string
	BranchToken []byte
	PrevTxnID   int64
	TxnID       int64
	Events      []*historypb.HistoryEvent
}

WorkflowEvents is used as generic workflow history events transaction container

type WorkflowMutation

type WorkflowMutation struct {
	ExecutionInfo  *persistencespb.WorkflowExecutionInfo
	ExecutionState *persistencespb.WorkflowExecutionState
	// TODO deprecate NextEventID in favor of DBRecordVersion
	NextEventID int64

	UpsertActivityInfos       map[int64]*persistencespb.ActivityInfo
	DeleteActivityInfos       map[int64]struct{}
	UpsertTimerInfos          map[string]*persistencespb.TimerInfo
	DeleteTimerInfos          map[string]struct{}
	UpsertChildExecutionInfos map[int64]*persistencespb.ChildExecutionInfo
	DeleteChildExecutionInfos map[int64]struct{}
	UpsertRequestCancelInfos  map[int64]*persistencespb.RequestCancelInfo
	DeleteRequestCancelInfos  map[int64]struct{}
	UpsertSignalInfos         map[int64]*persistencespb.SignalInfo
	DeleteSignalInfos         map[int64]struct{}
	UpsertSignalRequestedIDs  map[string]struct{}
	DeleteSignalRequestedIDs  map[string]struct{}
	UpsertChasmNodes          map[string]*persistencespb.ChasmNode
	DeleteChasmNodes          map[string]struct{}
	NewBufferedEvents         []*historypb.HistoryEvent
	ClearBufferedEvents       bool

	Tasks                 map[tasks.Category][]tasks.Task
	BestEffortDeleteTasks map[tasks.Category][]tasks.Key

	// TODO deprecate Condition in favor of DBRecordVersion
	Condition       int64
	DBRecordVersion int64
	Checksum        *persistencespb.Checksum
}

WorkflowMutation is used as generic workflow execution state mutation

type WorkflowSnapshot

type WorkflowSnapshot struct {
	ExecutionInfo  *persistencespb.WorkflowExecutionInfo
	ExecutionState *persistencespb.WorkflowExecutionState
	// TODO deprecate NextEventID in favor of DBRecordVersion
	NextEventID int64

	ActivityInfos       map[int64]*persistencespb.ActivityInfo
	TimerInfos          map[string]*persistencespb.TimerInfo
	ChildExecutionInfos map[int64]*persistencespb.ChildExecutionInfo
	RequestCancelInfos  map[int64]*persistencespb.RequestCancelInfo
	SignalInfos         map[int64]*persistencespb.SignalInfo
	SignalRequestedIDs  map[string]struct{}
	ChasmNodes          map[string]*persistencespb.ChasmNode

	Tasks map[tasks.Category][]tasks.Task

	// TODO deprecate Condition in favor of DBRecordVersion
	Condition       int64
	DBRecordVersion int64
	Checksum        *persistencespb.Checksum
}

WorkflowSnapshot is used as generic workflow execution state snapshot

type XDCCache

type XDCCache interface {
	Put(key XDCCacheKey, value XDCCacheValue)
	Get(key XDCCacheKey) (XDCCacheValue, bool)
}

type XDCCacheImpl

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

func NewEventsBlobCache

func NewEventsBlobCache(
	maxBytes int,
	ttl time.Duration,
	logger log.Logger,
) *XDCCacheImpl

func (*XDCCacheImpl) Get

func (e *XDCCacheImpl) Get(key XDCCacheKey) (XDCCacheValue, bool)

func (*XDCCacheImpl) Put

func (e *XDCCacheImpl) Put(
	key XDCCacheKey,
	value XDCCacheValue,
)

type XDCCacheKey

type XDCCacheKey struct {
	WorkflowKey definition.WorkflowKey
	MinEventID  int64 // inclusive
	Version     int64
}

func NewXDCCacheKey

func NewXDCCacheKey(
	workflowKey definition.WorkflowKey,
	minEventID int64,
	version int64,
) XDCCacheKey

type XDCCacheValue

type XDCCacheValue struct {
	BaseWorkflowInfo    *workflowspb.BaseExecutionInfo
	VersionHistoryItems []*historyspb.VersionHistoryItem
	EventBlobs          []*commonpb.DataBlob
	NextEventID         int64
}

func NewXDCCacheValue

func NewXDCCacheValue(
	baseWorkflowInfo *workflowspb.BaseExecutionInfo,
	versionHistoryItems []*historyspb.VersionHistoryItem,
	eventBlobs []*commonpb.DataBlob,
	nextEventID int64,
) XDCCacheValue

func (XDCCacheValue) CacheSize

func (v XDCCacheValue) CacheSize() int

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
nosql
sql
sqlplugin
Package sqlplugin is a generated GoMock package.
Package sqlplugin is a generated GoMock package.
Package visibility is a generated GoMock package.
Package visibility is a generated GoMock package.
manager
Package manager is a generated GoMock package.
Package manager is a generated GoMock package.
store
Package store is a generated GoMock package.
Package store is a generated GoMock package.
store/elasticsearch
Package elasticsearch is a generated GoMock package.
Package elasticsearch is a generated GoMock package.
store/elasticsearch/client
Package client is a generated GoMock package.
Package client is a generated GoMock package.
store/query
Package query is inspired and partially copied from by github.com/cch123/elasticsql.
Package query is inspired and partially copied from by github.com/cch123/elasticsql.

Jump to

Keyboard shortcuts

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