Documentation ¶
Index ¶
- Constants
- type ActivityInfoMapsDeleteFilter
- type ActivityInfoMapsRow
- type ActivityInfoMapsSelectFilter
- type AdminCRUD
- type AdminDB
- type BufferedEventsFilter
- type BufferedEventsRow
- type ChildExecutionInfoMapsDeleteFilter
- type ChildExecutionInfoMapsRow
- type ChildExecutionInfoMapsSelectFilter
- type ClusterMembershipFilter
- type ClusterMembershipRow
- type ClusterMetadata
- type ClusterMetadataRow
- type Conn
- type CurrentExecutionsFilter
- type CurrentExecutionsRow
- type DB
- type ExecutionsFilter
- type ExecutionsRow
- type HistoryExecution
- type HistoryExecutionActivity
- type HistoryExecutionBuffer
- type HistoryExecutionChildWorkflow
- type HistoryExecutionRequestCancel
- type HistoryExecutionSignal
- type HistoryExecutionSignalRequest
- type HistoryExecutionTimer
- type HistoryNode
- type HistoryNodeDeleteFilter
- type HistoryNodeRow
- type HistoryNodeSelectFilter
- type HistoryReplicationDLQTask
- type HistoryReplicationTask
- type HistoryShard
- type HistoryTimerTask
- type HistoryTransferTask
- type HistoryTree
- type HistoryTreeDeleteFilter
- type HistoryTreeRow
- type HistoryTreeSelectFilter
- type MatchingTask
- type MatchingTaskQueue
- type Namespace
- type NamespaceFilter
- type NamespaceMetadataRow
- type NamespaceRow
- type Plugin
- type PruneClusterMembershipFilter
- type QueueMessage
- type QueueMessagesFilter
- type QueueMessagesRangeFilter
- type QueueMetadataRow
- type QueueRow
- type ReplicationDLQTasksFilter
- type ReplicationDLQTasksRangeFilter
- type ReplicationDLQTasksRow
- type ReplicationTasksFilter
- type ReplicationTasksRangeFilter
- type ReplicationTasksRow
- type RequestCancelInfoMapsDeleteFilter
- type RequestCancelInfoMapsRow
- type RequestCancelInfoMapsSelectFilter
- type ShardsFilter
- type ShardsRow
- type SignalInfoMapsDeleteFilter
- type SignalInfoMapsRow
- type SignalInfoMapsSelectFilter
- type SignalsRequestedSetsDeleteFilter
- type SignalsRequestedSetsRow
- type SignalsRequestedSetsSelectFilter
- type TableCRUD
- type TaskQueuesFilter
- type TaskQueuesRow
- type TasksFilter
- type TasksRow
- type TimerInfoMapsDeleteFilter
- type TimerInfoMapsRow
- type TimerInfoMapsSelectFilter
- type TimerTasksFilter
- type TimerTasksRangeFilter
- type TimerTasksRow
- type TransferTasksFilter
- type TransferTasksRangeFilter
- type TransferTasksRow
- type Tx
- type Visibility
- type VisibilityDeleteFilter
- type VisibilityRow
- type VisibilitySelectFilter
Constants ¶
const ( EmptyMessageID = int64(-1) MinMessageID = EmptyMessageID + 1 MaxMessageID = math.MaxInt64 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityInfoMapsDeleteFilter ¶ added in v1.1.0
type ActivityInfoMapsDeleteFilter struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID ScheduleID *int64 }
type ActivityInfoMapsRow ¶
type ActivityInfoMapsRow struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID ScheduleID int64 Data []byte DataEncoding string }
ActivityInfoMapsRow represents a row in activity_info_maps table
type ActivityInfoMapsSelectFilter ¶ added in v1.1.0
type ActivityInfoMapsSelectFilter struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID }
type AdminCRUD ¶ added in v1.2.1
type AdminCRUD interface { CreateSchemaVersionTables() error ReadSchemaVersion(database string) (string, error) UpdateSchemaVersion(database string, newVersion string, minCompatibleVersion string) error WriteSchemaUpdateLog(oldVersion string, newVersion string, manifestMD5 string, desc string) error ListTables(database string) ([]string, error) DropTable(table string) error DropAllTables(database string) error CreateDatabase(database string) error DropDatabase(database string) error Exec(stmt string, args ...interface{}) error }
AdminCRUD defines admin operations for CLI and test suites
type BufferedEventsFilter ¶
type BufferedEventsFilter struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID }
BufferedEventsFilter contains the column names within buffered_events table that can be used to filter results through a WHERE clause
type BufferedEventsRow ¶
type BufferedEventsRow struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID Data []byte DataEncoding string }
BufferedEventsRow represents a row in buffered_events table
type ChildExecutionInfoMapsDeleteFilter ¶ added in v1.1.0
type ChildExecutionInfoMapsDeleteFilter struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID InitiatedID *int64 }
type ChildExecutionInfoMapsRow ¶
type ChildExecutionInfoMapsRow struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID InitiatedID int64 Data []byte DataEncoding string }
ChildExecutionInfoMapsRow represents a row in child_execution_info_maps table
type ChildExecutionInfoMapsSelectFilter ¶ added in v1.1.0
type ChildExecutionInfoMapsSelectFilter struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID }
type ClusterMembershipFilter ¶
type ClusterMembershipFilter struct { RPCAddressEquals string HostIDEquals []byte HostIDGreaterThan []byte RoleEquals persistence.ServiceType LastHeartbeatAfter time.Time RecordExpiryAfter time.Time SessionStartedAfter time.Time MaxRecordCount int }
ClusterMembershipFilter is used for GetClusterMembership queries
type ClusterMembershipRow ¶
type ClusterMembershipRow struct { Role persistence.ServiceType HostID []byte RPCAddress string RPCPort uint16 SessionStart time.Time LastHeartbeat time.Time RecordExpiry time.Time InsertionOrder uint64 }
ClusterMembershipRow represents a row in the cluster_membership table
type ClusterMetadata ¶ added in v1.2.1
type ClusterMetadata interface { SaveClusterMetadata(row *ClusterMetadataRow) (sql.Result, error) GetClusterMetadata() (*ClusterMetadataRow, error) WriteLockGetClusterMetadata() (*ClusterMetadataRow, error) GetClusterMembers(filter *ClusterMembershipFilter) ([]ClusterMembershipRow, error) UpsertClusterMembership(row *ClusterMembershipRow) (sql.Result, error) PruneClusterMembership(filter *PruneClusterMembershipFilter) (sql.Result, error) }
ClusterMetadata is the SQL persistence interface for cluster metadata
type ClusterMetadataRow ¶
type ClusterMetadataRow struct { Data []byte DataEncoding string Version int64 // TODO(vitarb): immutable metadata is needed for backward compatibility only, remove after 1.1 release. ImmutableData []byte ImmutableDataEncoding string }
ClusterMetadataRow represents a row in the cluster_metadata table
type Conn ¶
type Conn interface { Exec(query string, args ...interface{}) (sql.Result, error) NamedExec(query string, arg interface{}) (sql.Result, error) Get(dest interface{}, query string, args ...interface{}) error Select(dest interface{}, query string, args ...interface{}) error }
Conn defines the API for a single database connection
type CurrentExecutionsFilter ¶
type CurrentExecutionsFilter struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID }
CurrentExecutionsFilter contains the column names within current_executions table that can be used to filter results through a WHERE clause
type CurrentExecutionsRow ¶
type CurrentExecutionsRow struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID CreateRequestID string StartVersion int64 LastWriteVersion int64 State enumsspb.WorkflowExecutionState Status enumspb.WorkflowExecutionStatus }
CurrentExecutionsRow represents a row in current_executions table
type DB ¶
type DB interface { TableCRUD BeginTx() (Tx, error) PluginName() string IsDupEntryError(err error) bool Close() error }
DB defines the API for regular SQL operations of a Temporal server
type ExecutionsFilter ¶
type ExecutionsFilter struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID }
ExecutionsFilter contains the column names within executions table that can be used to filter results through a WHERE clause
type ExecutionsRow ¶
type ExecutionsRow struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID NextEventID int64 LastWriteVersion int64 Data []byte DataEncoding string State []byte StateEncoding string }
ExecutionsRow represents a row in executions table
type HistoryExecution ¶ added in v1.1.0
type HistoryExecution interface { InsertIntoExecutions(row *ExecutionsRow) (sql.Result, error) UpdateExecutions(row *ExecutionsRow) (sql.Result, error) SelectFromExecutions(filter ExecutionsFilter) (*ExecutionsRow, error) DeleteFromExecutions(filter ExecutionsFilter) (sql.Result, error) ReadLockExecutions(filter ExecutionsFilter) (int64, error) WriteLockExecutions(filter ExecutionsFilter) (int64, error) LockCurrentExecutionsJoinExecutions(filter CurrentExecutionsFilter) ([]CurrentExecutionsRow, error) InsertIntoCurrentExecutions(row *CurrentExecutionsRow) (sql.Result, error) UpdateCurrentExecutions(row *CurrentExecutionsRow) (sql.Result, error) // SelectFromCurrentExecutions returns one or more rows from current_executions table // Required params - {shardID, namespaceID, workflowID} SelectFromCurrentExecutions(filter CurrentExecutionsFilter) (*CurrentExecutionsRow, error) // DeleteFromCurrentExecutions deletes a single row that matches the filter criteria // If a row exist, that row will be deleted and this method will return success // If there is no row matching the filter criteria, this method will still return success // Callers can check the output of Result.RowsAffected() to see if a row was deleted or not // Required params - {shardID, namespaceID, workflowID, runID} DeleteFromCurrentExecutions(filter CurrentExecutionsFilter) (sql.Result, error) LockCurrentExecutions(filter CurrentExecutionsFilter) (*CurrentExecutionsRow, error) }
HistoryExecution is the SQL persistence interface for history executions
type HistoryExecutionActivity ¶ added in v1.1.0
type HistoryExecutionActivity interface { ReplaceIntoActivityInfoMaps(rows []ActivityInfoMapsRow) (sql.Result, error) // SelectFromActivityInfoMaps returns one or more rows from activity_info_maps SelectFromActivityInfoMaps(filter ActivityInfoMapsSelectFilter) ([]ActivityInfoMapsRow, error) // DeleteFromActivityInfoMaps deletes a row from activity_info_maps table // Required filter params // - single row delete - {shardID, namespaceID, workflowID, runID, scheduleID} // - range delete - {shardID, namespaceID, workflowID, runID} DeleteFromActivityInfoMaps(filter ActivityInfoMapsDeleteFilter) (sql.Result, error) }
HistoryExecutionActivity is the SQL persistence interface for history nodes and history execution activities
type HistoryExecutionBuffer ¶ added in v1.1.0
type HistoryExecutionBuffer interface { InsertIntoBufferedEvents(rows []BufferedEventsRow) (sql.Result, error) SelectFromBufferedEvents(filter BufferedEventsFilter) ([]BufferedEventsRow, error) DeleteFromBufferedEvents(filter BufferedEventsFilter) (sql.Result, error) }
HistoryExecutionBuffer is the SQL persistence interface for history nodes and history execution buffer events
type HistoryExecutionChildWorkflow ¶ added in v1.1.0
type HistoryExecutionChildWorkflow interface { ReplaceIntoChildExecutionInfoMaps(rows []ChildExecutionInfoMapsRow) (sql.Result, error) // SelectFromChildExecutionInfoMaps returns one or more rows form child_execution_info_maps table SelectFromChildExecutionInfoMaps(filter ChildExecutionInfoMapsSelectFilter) ([]ChildExecutionInfoMapsRow, error) // DeleteFromChildExecutionInfoMaps deletes one or more rows from child_execution_info_maps // Required filter params // - single row - {shardID, namespaceID, workflowID, runID, initiatedID} // - multiple rows - {shardID, namespaceID, workflowID, runID} DeleteFromChildExecutionInfoMaps(filter ChildExecutionInfoMapsDeleteFilter) (sql.Result, error) }
HistoryExecutionChildWorkflow is the SQL persistence interface for history execution child workflows
type HistoryExecutionRequestCancel ¶ added in v1.1.0
type HistoryExecutionRequestCancel interface { ReplaceIntoRequestCancelInfoMaps(rows []RequestCancelInfoMapsRow) (sql.Result, error) // SelectFromRequestCancelInfoMaps returns one or more rows form request_cancel_info_maps table SelectFromRequestCancelInfoMaps(filter RequestCancelInfoMapsSelectFilter) ([]RequestCancelInfoMapsRow, error) // DeleteFromRequestCancelInfoMaps deletes one or more rows from request_cancel_info_maps // Required filter params // - single row - {shardID, namespaceID, workflowID, runID, initiatedID} // - multiple rows - {shardID, namespaceID, workflowID, runID} DeleteFromRequestCancelInfoMaps(filter RequestCancelInfoMapsDeleteFilter) (sql.Result, error) }
HistoryExecutionRequestCancel is the SQL persistence interface for history execution request cancels
type HistoryExecutionSignal ¶ added in v1.1.0
type HistoryExecutionSignal interface { ReplaceIntoSignalInfoMaps(rows []SignalInfoMapsRow) (sql.Result, error) // SelectFromSignalInfoMaps returns one or more rows form signal_info_maps table SelectFromSignalInfoMaps(filter SignalInfoMapsSelectFilter) ([]SignalInfoMapsRow, error) // DeleteFromSignalInfoMaps deletes one or more rows from signal_info_maps table // Required filter params // - single row - {shardID, namespaceID, workflowID, runID, initiatedID} // - multiple rows - {shardID, namespaceID, workflowID, runID} DeleteFromSignalInfoMaps(filter SignalInfoMapsDeleteFilter) (sql.Result, error) }
HistoryExecutionSignal is the SQL persistence interface for history execution signals
type HistoryExecutionSignalRequest ¶ added in v1.1.0
type HistoryExecutionSignalRequest interface { ReplaceIntoSignalsRequestedSets(rows []SignalsRequestedSetsRow) (sql.Result, error) // SelectFromSignalInfoMaps returns one or more rows form signals_requested_sets table SelectFromSignalsRequestedSets(filter SignalsRequestedSetsSelectFilter) ([]SignalsRequestedSetsRow, error) // DeleteFromSignalsRequestedSets deletes one or more rows from signals_requested_sets // Required filter params // - single row - {shardID, namespaceID, workflowID, runID, signalID} // - multiple rows - {shardID, namespaceID, workflowID, runID} DeleteFromSignalsRequestedSets(filter SignalsRequestedSetsDeleteFilter) (sql.Result, error) }
HistoryExecutionSignalRequest is the SQL persistence interface for history execution signal request
type HistoryExecutionTimer ¶ added in v1.1.0
type HistoryExecutionTimer interface { ReplaceIntoTimerInfoMaps(rows []TimerInfoMapsRow) (sql.Result, error) // SelectFromTimerInfoMaps returns one or more rows form timer_info_maps table SelectFromTimerInfoMaps(filter TimerInfoMapsSelectFilter) ([]TimerInfoMapsRow, error) // DeleteFromTimerInfoMaps deletes one or more rows from timer_info_maps // Required filter params // - single row - {shardID, namespaceID, workflowID, runID, timerID} // - multiple rows - {shardID, namespaceID, workflowID, runID} DeleteFromTimerInfoMaps(filter TimerInfoMapsDeleteFilter) (sql.Result, error) }
HistoryExecutionTimer is the SQL persistence interface for history execution timers
type HistoryNode ¶ added in v1.1.0
type HistoryNode interface { InsertIntoHistoryNode(row *HistoryNodeRow) (sql.Result, error) SelectFromHistoryNode(filter HistoryNodeSelectFilter) ([]HistoryNodeRow, error) DeleteFromHistoryNode(filter HistoryNodeDeleteFilter) (sql.Result, error) }
HistoryNode is the SQL persistence interface for history nodes
type HistoryNodeDeleteFilter ¶ added in v1.1.0
type HistoryNodeDeleteFilter struct { ShardID int32 TreeID primitives.UUID BranchID primitives.UUID MinNodeID int64 }
HistoryNodeDeleteFilter contains the column names within history_node table that can be used to filter results through a WHERE clause
type HistoryNodeRow ¶
type HistoryNodeRow struct { ShardID int32 TreeID primitives.UUID BranchID primitives.UUID NodeID int64 TxnID int64 Data []byte DataEncoding string }
HistoryNodeRow represents a row in history_node table
type HistoryNodeSelectFilter ¶ added in v1.1.0
type HistoryNodeSelectFilter struct { ShardID int32 TreeID primitives.UUID BranchID primitives.UUID MinNodeID int64 MaxNodeID int64 PageSize int }
HistoryNodeSelectFilter contains the column names within history_node table that can be used to filter results through a WHERE clause
type HistoryReplicationDLQTask ¶ added in v1.2.1
type HistoryReplicationDLQTask interface { // InsertIntoReplicationDLQTasks puts the replication task into DLQ InsertIntoReplicationDLQTasks(row []ReplicationDLQTasksRow) (sql.Result, error) // SelectFromReplicationDLQTasks returns one or more rows from replication_tasks_dlq table SelectFromReplicationDLQTasks(filter ReplicationDLQTasksFilter) ([]ReplicationDLQTasksRow, error) // RangeSelectFromReplicationDLQTasks returns one or more rows from replication_tasks_dlq table RangeSelectFromReplicationDLQTasks(filter ReplicationDLQTasksRangeFilter) ([]ReplicationDLQTasksRow, error) // DeleteFromReplicationDLQTasks deletes one row from replication_tasks_dlq table DeleteFromReplicationDLQTasks(filter ReplicationDLQTasksFilter) (sql.Result, error) // RangeDeleteFromReplicationDLQTasks deletes one or more rows from replication_tasks_dlq table // ReplicationDLQTasksRangeFilter - {PageSize} will be ignored RangeDeleteFromReplicationDLQTasks(filter ReplicationDLQTasksRangeFilter) (sql.Result, error) }
HistoryReplicationDLQTask is the SQL persistence interface for history replication tasks DLQ
type HistoryReplicationTask ¶ added in v1.1.0
type HistoryReplicationTask interface { InsertIntoReplicationTasks(rows []ReplicationTasksRow) (sql.Result, error) // SelectFromReplicationTasks returns one or more rows from replication_tasks table SelectFromReplicationTasks(filter ReplicationTasksFilter) ([]ReplicationTasksRow, error) // RangeSelectFromReplicationTasks returns one or more rows from replication_tasks table RangeSelectFromReplicationTasks(filter ReplicationTasksRangeFilter) ([]ReplicationTasksRow, error) // DeleteFromReplicationTasks deletes a row from replication_tasks table DeleteFromReplicationTasks(filter ReplicationTasksFilter) (sql.Result, error) // DeleteFromReplicationTasks deletes multi rows from replication_tasks table // ReplicationTasksRangeFilter - {PageSize} will be ignored RangeDeleteFromReplicationTasks(filter ReplicationTasksRangeFilter) (sql.Result, error) }
HistoryReplicationTask is the SQL persistence interface for history replication tasks
type HistoryShard ¶ added in v1.1.0
type HistoryShard interface { InsertIntoShards(rows *ShardsRow) (sql.Result, error) UpdateShards(row *ShardsRow) (sql.Result, error) SelectFromShards(filter ShardsFilter) (*ShardsRow, error) ReadLockShards(filter ShardsFilter) (int64, error) WriteLockShards(filter ShardsFilter) (int64, error) }
HistoryShard is the SQL persistence interface for history shards
type HistoryTimerTask ¶ added in v1.1.0
type HistoryTimerTask interface { InsertIntoTimerTasks(rows []TimerTasksRow) (sql.Result, error) // SelectFromTimerTasks returns one or more rows from timer_tasks table SelectFromTimerTasks(filter TimerTasksFilter) ([]TimerTasksRow, error) // RangeSelectFromTimerTasks returns one or more rows from timer_tasks table RangeSelectFromTimerTasks(filter TimerTasksRangeFilter) ([]TimerTasksRow, error) // DeleteFromTimerTasks deletes one or more rows from timer_tasks table DeleteFromTimerTasks(filter TimerTasksFilter) (sql.Result, error) // RangeDeleteFromTimerTasks deletes one or more rows from timer_tasks table // TimerTasksRangeFilter - {TaskID, PageSize} will be ignored RangeDeleteFromTimerTasks(filter TimerTasksRangeFilter) (sql.Result, error) }
HistoryTimerTask is the SQL persistence interface for history timer tasks
type HistoryTransferTask ¶ added in v1.1.0
type HistoryTransferTask interface { InsertIntoTransferTasks(rows []TransferTasksRow) (sql.Result, error) // SelectFromTransferTasks returns rows that match filter criteria from transfer_tasks table. SelectFromTransferTasks(filter TransferTasksFilter) ([]TransferTasksRow, error) // RangeSelectFromTransferTasks returns rows that match filter criteria from transfer_tasks table. RangeSelectFromTransferTasks(filter TransferTasksRangeFilter) ([]TransferTasksRow, error) // DeleteFromTransferTasks deletes one rows from transfer_tasks table. DeleteFromTransferTasks(filter TransferTasksFilter) (sql.Result, error) // RangeDeleteFromTransferTasks deletes one or more rows from transfer_tasks table. RangeDeleteFromTransferTasks(filter TransferTasksRangeFilter) (sql.Result, error) }
HistoryTransferTask is the SQL persistence interface for history transfer tasks
type HistoryTree ¶ added in v1.1.0
type HistoryTree interface { InsertIntoHistoryTree(row *HistoryTreeRow) (sql.Result, error) SelectFromHistoryTree(filter HistoryTreeSelectFilter) ([]HistoryTreeRow, error) DeleteFromHistoryTree(filter HistoryTreeDeleteFilter) (sql.Result, error) }
HistoryNode is the SQL persistence interface for history trees
type HistoryTreeDeleteFilter ¶ added in v1.1.0
type HistoryTreeDeleteFilter struct { ShardID int32 TreeID primitives.UUID BranchID primitives.UUID }
HistoryTreeDeleteFilter contains the column names within history_tree table that can be used to filter results through a WHERE clause
type HistoryTreeRow ¶
type HistoryTreeRow struct { ShardID int32 TreeID primitives.UUID BranchID primitives.UUID Data []byte DataEncoding string }
HistoryTreeRow represents a row in history_tree table
type HistoryTreeSelectFilter ¶ added in v1.1.0
type HistoryTreeSelectFilter struct { ShardID int32 TreeID primitives.UUID }
HistoryTreeSelectFilter contains the column names within history_tree table that can be used to filter results through a WHERE clause
type MatchingTask ¶ added in v1.1.0
type MatchingTask interface { InsertIntoTasks(rows []TasksRow) (sql.Result, error) // SelectFromTasks retrieves one or more rows from the tasks table // Required filter params - {namespaceID, taskqueueName, taskType, minTaskID, maxTaskID, pageSize} SelectFromTasks(filter TasksFilter) ([]TasksRow, error) // DeleteFromTasks deletes a row from tasks table // Required filter params: // to delete single row // - {namespaceID, taskqueueName, taskType, taskID} // to delete multiple rows // - {namespaceID, taskqueueName, taskType, taskIDLessThanEquals, limit } // - this will delete upto limit number of tasks less than or equal to the given task id DeleteFromTasks(filter TasksFilter) (sql.Result, error) }
MatchingTask is the SQL persistence interface for matching tasks
type MatchingTaskQueue ¶ added in v1.1.0
type MatchingTaskQueue interface { InsertIntoTaskQueues(row *TaskQueuesRow) (sql.Result, error) UpdateTaskQueues(row *TaskQueuesRow) (sql.Result, error) // SelectFromTaskQueues returns one or more rows from task_queues table // Required Filter params: // to read a single row: {shardID, namespaceID, name, taskType} // to range read multiple rows: {shardID, namespaceIDGreaterThan, nameGreaterThan, taskTypeGreaterThan, pageSize} SelectFromTaskQueues(filter TaskQueuesFilter) ([]TaskQueuesRow, error) DeleteFromTaskQueues(filter TaskQueuesFilter) (sql.Result, error) LockTaskQueues(filter TaskQueuesFilter) (int64, error) }
MatchingTaskQueue is the SQL persistence interface for matching task queues
type Namespace ¶ added in v1.1.0
type Namespace interface { InsertIntoNamespace(rows *NamespaceRow) (sql.Result, error) UpdateNamespace(row *NamespaceRow) (sql.Result, error) // SelectFromNamespace returns namespaces that match filter criteria. Either ID or // Name can be specified to filter results. If both are not specified, all rows // will be returned SelectFromNamespace(filter NamespaceFilter) ([]NamespaceRow, error) // DeleteNamespace deletes a single row. One of ID or Name MUST be specified DeleteFromNamespace(filter NamespaceFilter) (sql.Result, error) LockNamespaceMetadata() (*NamespaceMetadataRow, error) UpdateNamespaceMetadata(row *NamespaceMetadataRow) (sql.Result, error) SelectFromNamespaceMetadata() (*NamespaceMetadataRow, error) }
Namespace is the SQL persistence interface for namespaces
type NamespaceFilter ¶
type NamespaceFilter struct { ID *primitives.UUID Name *string GreaterThanID *primitives.UUID PageSize *int }
NamespaceFilter contains the column names within namespace table that can be used to filter results through a WHERE clause. When ID is not nil, it will be used for WHERE condition. If ID is nil and Name is non-nil, Name will be used for WHERE condition. When both ID and Name are nil, no WHERE clause will be used
type NamespaceMetadataRow ¶
type NamespaceMetadataRow struct {
NotificationVersion int64
}
NamespaceMetadataRow represents a row in namespace_metadata table
type NamespaceRow ¶
type NamespaceRow struct { ID primitives.UUID Name string Data []byte DataEncoding string IsGlobal bool NotificationVersion int64 }
NamespaceRow represents a row in namespace table
type Plugin ¶
type Plugin interface { CreateDB(cfg *config.SQL) (DB, error) CreateAdminDB(cfg *config.SQL) (AdminDB, error) }
Plugin defines the interface for any SQL database that needs to implement
type PruneClusterMembershipFilter ¶
PruneClusterMembershipFilter is used for PruneClusterMembership queries
type QueueMessage ¶ added in v1.3.0
type QueueMessage interface { InsertIntoMessages(row []QueueRow) (sql.Result, error) SelectFromMessages(filter QueueMessagesFilter) ([]QueueRow, error) RangeSelectFromMessages(filter QueueMessagesRangeFilter) ([]QueueRow, error) DeleteFromMessages(filter QueueMessagesFilter) (sql.Result, error) RangeDeleteFromMessages(filter QueueMessagesRangeFilter) (sql.Result, error) GetLastEnqueuedMessageIDForUpdate(queueType persistence.QueueType) (int64, error) InsertAckLevel(queueType persistence.QueueType, messageID int64, clusterName string) error UpdateAckLevels(queueType persistence.QueueType, clusterAckLevels map[string]int64) error GetAckLevels(queueType persistence.QueueType, forUpdate bool) (map[string]int64, error) }
type QueueMessagesFilter ¶ added in v1.3.0
type QueueMessagesFilter struct { QueueType persistence.QueueType MessageID int64 }
QueueMessagesFilter
type QueueMessagesRangeFilter ¶ added in v1.3.0
type QueueMessagesRangeFilter struct { QueueType persistence.QueueType MinMessageID int64 MaxMessageID int64 PageSize int }
QueueMessagesRangeFilter
type QueueMetadataRow ¶
type QueueMetadataRow struct { QueueType persistence.QueueType Data []byte }
QueueMetadataRow represents a row in queue_metadata table
type QueueRow ¶
type QueueRow struct { QueueType persistence.QueueType MessageID int64 MessagePayload []byte }
QueueRow represents a row in queue table
type ReplicationDLQTasksFilter ¶ added in v1.2.1
ReplicationDLQTasksFilter contains the column names within replication_tasks_dlq table that can be used to filter results through a WHERE clause
type ReplicationDLQTasksRangeFilter ¶ added in v1.2.1
type ReplicationDLQTasksRangeFilter struct { ShardID int32 SourceClusterName string MinTaskID int64 MaxTaskID int64 PageSize int }
ReplicationDLQTasksRangeFilter
type ReplicationDLQTasksRow ¶ added in v1.2.1
type ReplicationDLQTasksRow struct { SourceClusterName string ShardID int32 TaskID int64 Data []byte DataEncoding string }
ReplicationDLQTasksRow represents a row in replication_tasks_dlq table
type ReplicationTasksFilter ¶
ReplicationTasksFilter contains the column names within replication_tasks table that can be used to filter results through a WHERE clause
type ReplicationTasksRangeFilter ¶ added in v1.2.1
type ReplicationTasksRangeFilter struct { ShardID int32 MinTaskID int64 MaxTaskID int64 PageSize int }
ReplicationTasksFilter contains the column names within replication_tasks table that can be used to filter results through a WHERE clause
type ReplicationTasksRow ¶
ReplicationTasksRow represents a row in replication_tasks table
type RequestCancelInfoMapsDeleteFilter ¶ added in v1.1.0
type RequestCancelInfoMapsDeleteFilter struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID InitiatedID *int64 }
type RequestCancelInfoMapsRow ¶
type RequestCancelInfoMapsRow struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID InitiatedID int64 Data []byte DataEncoding string }
RequestCancelInfoMapsRow represents a row in request_cancel_info_maps table
type RequestCancelInfoMapsSelectFilter ¶ added in v1.1.0
type RequestCancelInfoMapsSelectFilter struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID }
type ShardsFilter ¶
type ShardsFilter struct {
ShardID int32
}
ShardsFilter contains the column names within shards table that can be used to filter results through a WHERE clause
type SignalInfoMapsDeleteFilter ¶ added in v1.1.0
type SignalInfoMapsDeleteFilter struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID InitiatedID *int64 }
type SignalInfoMapsRow ¶
type SignalInfoMapsRow struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID InitiatedID int64 Data []byte DataEncoding string }
SignalInfoMapsRow represents a row in signal_info_maps table
type SignalInfoMapsSelectFilter ¶ added in v1.1.0
type SignalInfoMapsSelectFilter struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID }
type SignalsRequestedSetsDeleteFilter ¶ added in v1.1.0
type SignalsRequestedSetsDeleteFilter struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID SignalID *string }
type SignalsRequestedSetsRow ¶
type SignalsRequestedSetsRow struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID SignalID string }
SignalsRequestedSetsRow represents a row in signals_requested_sets table
type SignalsRequestedSetsSelectFilter ¶ added in v1.1.0
type SignalsRequestedSetsSelectFilter struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID }
type TableCRUD ¶ added in v1.2.1
type TableCRUD interface { ClusterMetadata Namespace Visibility QueueMessage MatchingTask MatchingTaskQueue HistoryNode HistoryTree HistoryShard HistoryExecution HistoryExecutionBuffer HistoryExecutionActivity HistoryExecutionChildWorkflow HistoryExecutionTimer HistoryExecutionRequestCancel HistoryExecutionSignal HistoryExecutionSignalRequest HistoryTransferTask HistoryTimerTask HistoryReplicationTask HistoryReplicationDLQTask }
TableCRUD defines the API for interacting with the database tables
type TaskQueuesFilter ¶
type TaskQueuesFilter struct { RangeHash uint32 RangeHashGreaterThanEqualTo uint32 RangeHashLessThanEqualTo uint32 TaskQueueID []byte TaskQueueIDGreaterThan []byte RangeID *int64 PageSize *int }
TaskQueuesFilter contains the column names within task_queues table that can be used to filter results through a WHERE clause
type TaskQueuesRow ¶
type TaskQueuesRow struct { RangeHash uint32 TaskQueueID []byte RangeID int64 Data []byte DataEncoding string }
TaskQueuesRow represents a row in task_queues table
type TasksFilter ¶
type TasksFilter struct { RangeHash uint32 TaskQueueID []byte TaskID *int64 MinTaskID *int64 MaxTaskID *int64 TaskIDLessThanEquals *int64 Limit *int PageSize *int }
TasksFilter contains the column names within tasks table that can be used to filter results through a WHERE clause
type TasksRow ¶
type TasksRow struct { RangeHash uint32 TaskQueueID []byte TaskID int64 Data []byte DataEncoding string }
TasksRow represents a row in tasks table
type TimerInfoMapsDeleteFilter ¶ added in v1.1.0
type TimerInfoMapsDeleteFilter struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID TimerID *string }
type TimerInfoMapsRow ¶
type TimerInfoMapsRow struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID TimerID string Data []byte DataEncoding string }
TimerInfoMapsRow represents a row in timer_info_maps table
type TimerInfoMapsSelectFilter ¶ added in v1.1.0
type TimerInfoMapsSelectFilter struct { ShardID int32 NamespaceID primitives.UUID WorkflowID string RunID primitives.UUID }
type TimerTasksFilter ¶
TimerTasksFilter contains the column names within timer_tasks table that can be used to filter results through a WHERE clause
type TimerTasksRangeFilter ¶ added in v1.1.0
type TimerTasksRangeFilter struct { ShardID int32 TaskID int64 MinVisibilityTimestamp time.Time MaxVisibilityTimestamp time.Time PageSize int }
TimerTasksFilter contains the column names within timer_tasks table that can be used to filter results through a WHERE clause
type TimerTasksRow ¶
type TimerTasksRow struct { ShardID int32 VisibilityTimestamp time.Time TaskID int64 Data []byte DataEncoding string }
TimerTasksRow represents a row in timer_tasks table
type TransferTasksFilter ¶
TransferTasksFilter contains the column names within transfer_tasks table that can be used to filter results through a WHERE clause
type TransferTasksRangeFilter ¶ added in v1.1.0
TransferTasksRangeFilter contains the column names within transfer_tasks table that can be used to filter results through a WHERE clause
type TransferTasksRow ¶
TransferTasksRow represents a row in transfer_tasks table
type Visibility ¶ added in v1.1.0
type Visibility interface { // InsertIntoVisibility inserts a row into visibility table. If a row already exist, // no changes will be made by this API InsertIntoVisibility(row *VisibilityRow) (sql.Result, error) // ReplaceIntoVisibility deletes old row (if it exist) and inserts new row into visibility table ReplaceIntoVisibility(row *VisibilityRow) (sql.Result, error) // SelectFromVisibility returns one or more rows from visibility table // Required filter params: // - getClosedWorkflowExecution - retrieves single row - {namespaceID, runID, closed=true} // - All other queries retrieve multiple rows (range): // - MUST specify following required params: // - namespaceID, minStartTime, maxStartTime, runID and pageSize where some or all of these may come from previous page token // - OPTIONALLY specify one of following params // - workflowID, workflowTypeName, status (along with closed=true) SelectFromVisibility(filter VisibilitySelectFilter) ([]VisibilityRow, error) DeleteFromVisibility(filter VisibilityDeleteFilter) (sql.Result, error) }
type VisibilityDeleteFilter ¶ added in v1.1.0
type VisibilityRow ¶
type VisibilityRow struct { NamespaceID string RunID string WorkflowTypeName string WorkflowID string StartTime time.Time ExecutionTime time.Time Status int32 CloseTime *time.Time HistoryLength *int64 Memo []byte Encoding string }
VisibilityRow represents a row in executions_visibility table
type VisibilitySelectFilter ¶ added in v1.1.0
type VisibilitySelectFilter struct { NamespaceID string RunID *string WorkflowID *string WorkflowTypeName *string Status int32 MinTime *time.Time MaxTime *time.Time PageSize *int }
VisibilitySelectFilter contains the column names within executions_visibility table that can be used to filter results through a WHERE clause
Source Files ¶
- cluster_metadata.go
- history_activity.go
- history_buffer.go
- history_child_workflow.go
- history_execution.go
- history_node.go
- history_replication_dlq_tasks.go
- history_replication_tasks.go
- history_request_cancel.go
- history_shard.go
- history_signal.go
- history_signal_request.go
- history_timer.go
- history_timer_tasks.go
- history_transfer_tasks.go
- history_tree.go
- interfaces.go
- matching_task.go
- matching_task_queue.go
- namespace.go
- queue_message.go
- visibility.go