query

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry interface {
	HasBufferedQuery() bool
	GetBufferedIDs() []string
	HasCompletedQuery() bool
	GetCompletedIDs() []string
	HasUnblockedQuery() bool
	GetUnblockedIDs() []string
	HasFailedQuery() bool
	GetFailedIDs() []string

	GetQueryTermCh(string) (<-chan struct{}, error)
	GetQueryInput(string) (*types.WorkflowQuery, error)
	GetTerminationState(string) (*TerminationState, error)

	BufferQuery(queryInput *types.WorkflowQuery) (string, <-chan struct{})
	SetTerminationState(string, *TerminationState) error
	RemoveQuery(id string)
}

Registry manages all the queries for a workflow

func NewRegistry

func NewRegistry() Registry

NewRegistry creates a new query registry

type TerminationState

type TerminationState struct {
	TerminationType TerminationType
	QueryResult     *types.WorkflowQueryResult
	Failure         error
}

TerminationState describes a query's termination state

type TerminationType

type TerminationType int

TerminationType is the type of a query's termination state

const (
	// TerminationTypeCompleted means a query reaches its termination state because it has been completed
	TerminationTypeCompleted TerminationType = iota
	// TerminationTypeUnblocked means a query reaches its termination state because it has been unblocked
	TerminationTypeUnblocked
	// TerminationTypeFailed means a query reaches its termination state because it has failed
	TerminationTypeFailed
)

Jump to

Keyboard shortcuts

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