Documentation
¶
Index ¶
- Variables
- type CheckRun
- func (r *CheckRun) ChildrenComplete() bool
- func (r *CheckRun) Execute(ctx context.Context)
- func (r *CheckRun) GetError() error
- func (r *CheckRun) GetName() string
- func (r *CheckRun) GetRunStatus() dashboardinterfaces.DashboardRunStatus
- func (r *CheckRun) RunComplete() bool
- func (r *CheckRun) SetComplete()
- func (r *CheckRun) SetError(err error)
- type ControlEventHooks
- type DashboardContainerRun
- func (r *DashboardContainerRun) ChildCompleteChan() chan dashboardinterfaces.DashboardNodeRun
- func (r *DashboardContainerRun) ChildrenComplete() bool
- func (r *DashboardContainerRun) Execute(ctx context.Context)
- func (r *DashboardContainerRun) GetChildren() []dashboardinterfaces.DashboardNodeRun
- func (r *DashboardContainerRun) GetError() error
- func (r *DashboardContainerRun) GetName() string
- func (r *DashboardContainerRun) GetRunStatus() dashboardinterfaces.DashboardRunStatus
- func (r *DashboardContainerRun) RunComplete() bool
- func (r *DashboardContainerRun) SetComplete()
- func (r *DashboardContainerRun) SetError(err error)
- type DashboardExecutionTree
- func (e *DashboardExecutionTree) Cancel()
- func (e *DashboardExecutionTree) ChildCompleteChan() chan dashboardinterfaces.DashboardNodeRun
- func (e *DashboardExecutionTree) Execute(ctx context.Context)
- func (e *DashboardExecutionTree) GetInputValue(name string) interface{}
- func (e *DashboardExecutionTree) GetName() string
- func (e *DashboardExecutionTree) GetRunStatus() dashboardinterfaces.DashboardRunStatus
- func (e *DashboardExecutionTree) SetError(err error)
- func (e *DashboardExecutionTree) SetInputs(inputValues map[string]interface{}) error
- type DashboardExecutor
- func (e *DashboardExecutor) ClearDashboard(_ context.Context, sessionId string)
- func (e *DashboardExecutor) ExecuteDashboard(ctx context.Context, sessionId, dashboardName string, ...) (err error)
- func (e *DashboardExecutor) OnInputChanged(ctx context.Context, sessionId string, inputs map[string]interface{}, ...) error
- type DashboardRun
- func (r *DashboardRun) ChildCompleteChan() chan dashboardinterfaces.DashboardNodeRun
- func (r *DashboardRun) ChildrenComplete() bool
- func (r *DashboardRun) Execute(ctx context.Context)
- func (r *DashboardRun) GetError() error
- func (r *DashboardRun) GetInput(name string) (*modconfig.DashboardInput, bool)
- func (r *DashboardRun) GetInputsDependingOn(changedInputName string) []string
- func (r *DashboardRun) GetName() string
- func (r *DashboardRun) GetRunStatus() dashboardinterfaces.DashboardRunStatus
- func (r *DashboardRun) RunComplete() bool
- func (r *DashboardRun) SetComplete()
- func (r *DashboardRun) SetError(err error)
- type LeafData
- type LeafDataColumnType
- type LeafRun
- func (r *LeafRun) ChildrenComplete() bool
- func (r *LeafRun) Execute(ctx context.Context)
- func (r *LeafRun) GetError() error
- func (r *LeafRun) GetName() string
- func (r *LeafRun) GetRunStatus() dashboardinterfaces.DashboardRunStatus
- func (r *LeafRun) RunComplete() bool
- func (r *LeafRun) SetComplete()
- func (r *LeafRun) SetError(err error)
- type ResolvedRuntimeDependency
Constants ¶
This section is empty.
Variables ¶
var Executor = newDashboardExecutor()
Functions ¶
This section is empty.
Types ¶
type CheckRun ¶
type CheckRun struct {
Name string `json:"name"`
Title string `json:"title,omitempty"`
Width int `json:"width,omitempty"`
ErrorString string `json:"error,omitempty"`
NodeType string `json:"node_type"`
ControlExecutionTree *controlexecute.ExecutionTree `json:"execution_tree"`
DashboardName string `json:"dashboard"`
SourceDefinition string `json:"source_definition"`
// contains filtered or unexported fields
}
CheckRun is a struct representing the execution of a leaf dashboard node
func NewCheckRun ¶
func NewCheckRun(resource modconfig.DashboardLeafNode, parent dashboardinterfaces.DashboardNodeParent, executionTree *DashboardExecutionTree) (*CheckRun, error)
func (*CheckRun) ChildrenComplete ¶
ChildrenComplete implements DashboardNodeRun
func (*CheckRun) GetRunStatus ¶
func (r *CheckRun) GetRunStatus() dashboardinterfaces.DashboardRunStatus
GetRunStatus implements DashboardNodeRun
func (*CheckRun) RunComplete ¶
RunComplete implements DashboardNodeRun
func (*CheckRun) SetComplete ¶
func (r *CheckRun) SetComplete()
SetComplete implements DashboardNodeRun
type ControlEventHooks ¶
type ControlEventHooks struct {
CheckRun *CheckRun
}
ControlEventHooks is a struct which implements ControlHooks, and displays the control progress as a status message
func NewControlEventHooks ¶
func NewControlEventHooks(r *CheckRun) *ControlEventHooks
func (*ControlEventHooks) OnControlEvent ¶
func (c *ControlEventHooks) OnControlEvent(ctx context.Context, _ *controlhooks.ControlProgress)
func (*ControlEventHooks) OnDone ¶
func (c *ControlEventHooks) OnDone(ctx context.Context, _ *controlhooks.ControlProgress)
func (*ControlEventHooks) OnStart ¶
func (c *ControlEventHooks) OnStart(ctx context.Context, _ *controlhooks.ControlProgress)
type DashboardContainerRun ¶
type DashboardContainerRun struct {
Name string `json:"name"`
Title string `json:"title,omitempty"`
Width int `json:"width,omitempty"`
ErrorString string `json:"error,omitempty"`
Children []dashboardinterfaces.DashboardNodeRun `json:"children,omitempty"`
NodeType string `json:"node_type"`
Status dashboardinterfaces.DashboardRunStatus `json:"status"`
DashboardName string `json:"report"`
SourceDefinition string `json:"source_definition"`
// contains filtered or unexported fields
}
DashboardContainerRun is a struct representing a container run
func NewDashboardContainerRun ¶
func NewDashboardContainerRun(container *modconfig.DashboardContainer, parent dashboardinterfaces.DashboardNodeParent, executionTree *DashboardExecutionTree) (*DashboardContainerRun, error)
func (*DashboardContainerRun) ChildCompleteChan ¶
func (r *DashboardContainerRun) ChildCompleteChan() chan dashboardinterfaces.DashboardNodeRun
func (*DashboardContainerRun) ChildrenComplete ¶
func (r *DashboardContainerRun) ChildrenComplete() bool
ChildrenComplete implements DashboardNodeRun
func (*DashboardContainerRun) Execute ¶
func (r *DashboardContainerRun) Execute(ctx context.Context)
Execute implements DashboardRunNode execute all children and wait for them to complete
func (*DashboardContainerRun) GetChildren ¶
func (r *DashboardContainerRun) GetChildren() []dashboardinterfaces.DashboardNodeRun
GetChildren implements DashboardNodeRun
func (*DashboardContainerRun) GetError ¶
func (r *DashboardContainerRun) GetError() error
GetError implements DashboardNodeRun
func (*DashboardContainerRun) GetName ¶
func (r *DashboardContainerRun) GetName() string
GetName implements DashboardNodeRun
func (*DashboardContainerRun) GetRunStatus ¶
func (r *DashboardContainerRun) GetRunStatus() dashboardinterfaces.DashboardRunStatus
GetRunStatus implements DashboardNodeRun
func (*DashboardContainerRun) RunComplete ¶
func (r *DashboardContainerRun) RunComplete() bool
RunComplete implements DashboardNodeRun
func (*DashboardContainerRun) SetComplete ¶
func (r *DashboardContainerRun) SetComplete()
SetComplete implements DashboardNodeRun
func (*DashboardContainerRun) SetError ¶
func (r *DashboardContainerRun) SetError(err error)
SetError implements DashboardNodeRun tell parent we are done
type DashboardExecutionTree ¶
type DashboardExecutionTree struct {
Root *DashboardRun
// contains filtered or unexported fields
}
DashboardExecutionTree is a structure representing the control result hierarchy
func NewDashboardExecutionTree ¶
func NewDashboardExecutionTree(reportName string, sessionId string, client db_common.Client, workspace *workspace.Workspace) (*DashboardExecutionTree, error)
NewDashboardExecutionTree creates a result group from a ModTreeItem
func (*DashboardExecutionTree) Cancel ¶
func (e *DashboardExecutionTree) Cancel()
func (*DashboardExecutionTree) ChildCompleteChan ¶
func (e *DashboardExecutionTree) ChildCompleteChan() chan dashboardinterfaces.DashboardNodeRun
ChildCompleteChan implements DashboardNodeParent
func (*DashboardExecutionTree) Execute ¶
func (e *DashboardExecutionTree) Execute(ctx context.Context)
func (*DashboardExecutionTree) GetInputValue ¶
func (e *DashboardExecutionTree) GetInputValue(name string) interface{}
func (*DashboardExecutionTree) GetName ¶
func (e *DashboardExecutionTree) GetName() string
GetName implements DashboardNodeParent use mod chort name - this will be the root name for all child runs
func (*DashboardExecutionTree) GetRunStatus ¶
func (e *DashboardExecutionTree) GetRunStatus() dashboardinterfaces.DashboardRunStatus
GetRunStatus returns the stats of the Root run
func (*DashboardExecutionTree) SetError ¶
func (e *DashboardExecutionTree) SetError(err error)
SetError sets the error on the Root run
func (*DashboardExecutionTree) SetInputs ¶
func (e *DashboardExecutionTree) SetInputs(inputValues map[string]interface{}) error
type DashboardExecutor ¶
type DashboardExecutor struct {
// contains filtered or unexported fields
}
func (*DashboardExecutor) ClearDashboard ¶
func (e *DashboardExecutor) ClearDashboard(_ context.Context, sessionId string)
func (*DashboardExecutor) ExecuteDashboard ¶
func (*DashboardExecutor) OnInputChanged ¶
type DashboardRun ¶
type DashboardRun struct {
Name string `json:"name"`
Title string `json:"title,omitempty"`
Width int `json:"width,omitempty"`
Description string `json:"description,omitempty"`
Documentation string `json:"documentation,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
ErrorString string `json:"error,omitempty"`
Children []dashboardinterfaces.DashboardNodeRun `json:"children,omitempty"`
NodeType string `json:"node_type"`
Status dashboardinterfaces.DashboardRunStatus `json:"status"`
DashboardName string `json:"dashboard"`
SourceDefinition string `json:"source_definition"`
// contains filtered or unexported fields
}
DashboardRun is a struct representing a container run
func NewDashboardRun ¶
func NewDashboardRun(dashboard *modconfig.Dashboard, parent dashboardinterfaces.DashboardNodeParent, executionTree *DashboardExecutionTree) (*DashboardRun, error)
func (*DashboardRun) ChildCompleteChan ¶
func (r *DashboardRun) ChildCompleteChan() chan dashboardinterfaces.DashboardNodeRun
func (*DashboardRun) ChildrenComplete ¶
func (r *DashboardRun) ChildrenComplete() bool
ChildrenComplete implements DashboardNodeRun
func (*DashboardRun) Execute ¶
func (r *DashboardRun) Execute(ctx context.Context)
Execute implements DashboardRunNode execute all children and wait for them to complete
func (*DashboardRun) GetError ¶
func (r *DashboardRun) GetError() error
GetError implements DashboardNodeRun
func (*DashboardRun) GetInput ¶
func (r *DashboardRun) GetInput(name string) (*modconfig.DashboardInput, bool)
GetInput searches for an input with the given name
func (*DashboardRun) GetInputsDependingOn ¶
func (r *DashboardRun) GetInputsDependingOn(changedInputName string) []string
GetInputsDependingOn returns a list o DashboardInputs which have a runtime depdendency on the given input
func (*DashboardRun) GetName ¶
func (r *DashboardRun) GetName() string
GetName implements DashboardNodeRun
func (*DashboardRun) GetRunStatus ¶
func (r *DashboardRun) GetRunStatus() dashboardinterfaces.DashboardRunStatus
GetRunStatus implements DashboardNodeRun
func (*DashboardRun) RunComplete ¶
func (r *DashboardRun) RunComplete() bool
RunComplete implements DashboardNodeRun
func (*DashboardRun) SetComplete ¶
func (r *DashboardRun) SetComplete()
SetComplete implements DashboardNodeRun
func (*DashboardRun) SetError ¶
func (r *DashboardRun) SetError(err error)
SetError implements DashboardNodeRun tell parent we are done
type LeafData ¶
type LeafData struct {
Columns []*LeafDataColumnType `json:"columns"`
Rows [][]interface{} `json:"rows"`
}
func NewLeafData ¶
func NewLeafData(result *queryresult.SyncQueryResult) *LeafData
type LeafDataColumnType ¶
type LeafDataColumnType struct {
Name string `json:"name"`
DataType string `json:"data_type_name"`
}
func NewLeafDataColumnType ¶
func NewLeafDataColumnType(sqlType *sql.ColumnType) *LeafDataColumnType
type LeafRun ¶
type LeafRun struct {
Name string `json:"name"`
Title string `json:"title,omitempty"`
Width int `json:"width,omitempty"`
RawSQL string `json:"sql,omitempty"`
Args []string `json:"args,omitempty"`
Data *LeafData `json:"data,omitempty"`
ErrorString string `json:"error,omitempty"`
DashboardNode modconfig.DashboardLeafNode `json:"properties"`
NodeType string `json:"node_type"`
DashboardName string `json:"dashboard"`
SourceDefinition string `json:"source_definition"`
// contains filtered or unexported fields
}
LeafRun is a struct representing the execution of a leaf dashboard node
func NewLeafRun ¶
func NewLeafRun(resource modconfig.DashboardLeafNode, parent dashboardinterfaces.DashboardNodeParent, executionTree *DashboardExecutionTree) (*LeafRun, error)
func (*LeafRun) ChildrenComplete ¶
ChildrenComplete implements DashboardNodeRun
func (*LeafRun) GetRunStatus ¶
func (r *LeafRun) GetRunStatus() dashboardinterfaces.DashboardRunStatus
GetRunStatus implements DashboardNodeRun
func (*LeafRun) RunComplete ¶
RunComplete implements DashboardNodeRun
func (*LeafRun) SetComplete ¶
func (r *LeafRun) SetComplete()
SetComplete implements DashboardNodeRun
type ResolvedRuntimeDependency ¶
type ResolvedRuntimeDependency struct {
// contains filtered or unexported fields
}
ResolvedRuntimeDependency is a wrapper for RuntimeDependency which contains the resolved value we must wrap it so that we do not mutate the underlying workspace data when resolving dependency values
func NewResolvedRuntimeDependency ¶
func NewResolvedRuntimeDependency(dep *modconfig.RuntimeDependency, executionTree *DashboardExecutionTree) *ResolvedRuntimeDependency
func (*ResolvedRuntimeDependency) Resolve ¶
func (d *ResolvedRuntimeDependency) Resolve() bool