query

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 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) (*shared.WorkflowQuery, error)
	GetTerminationState(string) (*TerminationState, error)

	BufferQuery(queryInput *shared.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     *shared.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