get

package
v0.8.24 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAndWriteExecConfigForTask

func CreateAndWriteExecConfigForTask(task *admin.Task, fileName string) error

func CreateAndWriteExecConfigForWorkflow

func CreateAndWriteExecConfigForWorkflow(wlp *admin.LaunchPlan, fileName string) error

func CreateGetCommand

func CreateGetCommand() *cobra.Command

CreateGetCommand will return get command

func ExecutionToProtoMessages

func ExecutionToProtoMessages(l []*admin.Execution) []proto.Message

func FetchAndUnDecorateMatchableAttr

func FetchAndUnDecorateMatchableAttr(ctx context.Context, project, domain, workflowName string,
	fetcher ext.AdminFetcherExtInterface, unDecorator sconfig.MatchableAttributeUnDecorator, rsType admin.MatchableResource) error

func FetchLPForName

func FetchLPForName(ctx context.Context, fetcher ext.AdminFetcherExtInterface, name, project,
	domain string) ([]*admin.LaunchPlan, error)

FetchLPForName fetches the launchplan give it name.

func FetchTaskForName

func FetchTaskForName(ctx context.Context, fetcher ext.AdminFetcherExtInterface, name, project, domain string) ([]*admin.Task, error)

FetchTaskForName Reads the task config to drive fetching the correct tasks.

func FetchWorkflowForName

func FetchWorkflowForName(ctx context.Context, fetcher ext.AdminFetcherExtInterface, name, project,
	domain string) (workflows []*admin.Workflow, isList bool, err error)

FetchWorkflowForName fetches the workflow give it name.

func LaunchplanToProtoMessages

func LaunchplanToProtoMessages(l []*admin.LaunchPlan) []proto.Message

func LaunchplanToTableProtoMessages

func LaunchplanToTableProtoMessages(l []*admin.LaunchPlan) []proto.Message

func NamedEntityToProtoMessages

func NamedEntityToProtoMessages(l []*admin.NamedEntity) []proto.Message

func ParamMapForTask

func ParamMapForTask(task *admin.Task) (map[string]yaml.Node, error)

func ParamMapForWorkflow

func ParamMapForWorkflow(lp *admin.LaunchPlan) (map[string]yaml.Node, error)

func ProjectToProtoMessages

func ProjectToProtoMessages(l []*admin.Project) []proto.Message

func TaskInputs

func TaskInputs(task *admin.Task) map[string]*core.Variable

func TaskToProtoMessages

func TaskToProtoMessages(l []*admin.Task) []proto.Message

func TaskToTableProtoMessages

func TaskToTableProtoMessages(l []*admin.Task) []proto.Message

func WorkflowParams

func WorkflowParams(lp *admin.LaunchPlan) map[string]*core.Parameter

func WorkflowToProtoMessages

func WorkflowToProtoMessages(l []*admin.Workflow) []proto.Message

func WorkflowToTableProtoMessages

func WorkflowToTableProtoMessages(l []*admin.Workflow) []proto.Message

func WriteExecConfigToFile

func WriteExecConfigToFile(executionConfig ExecutionConfig, fileName string) error

Types

type ExecutionConfig

type ExecutionConfig struct {
	IamRoleARN      string               `yaml:"iamRoleARN"`
	Inputs          map[string]yaml.Node `yaml:"inputs"`
	Envs            map[string]string    `yaml:"envs"`
	KubeServiceAcct string               `yaml:"kubeServiceAcct"`
	TargetDomain    string               `yaml:"targetDomain"`
	TargetProject   string               `yaml:"targetProject"`
	Task            string               `yaml:"task,omitempty"`
	Version         string               `yaml:"version"`
	Workflow        string               `yaml:"workflow,omitempty"`
}

ExecutionConfig is duplicated struct from create with the same structure. This is to avoid the circular dependency. Only works with go-yaml. TODO : replace this with a cleaner design

type NodeExecution

type NodeExecution struct {
	*admin.NodeExecution
}

func (*NodeExecution) MarshalJSON

func (in *NodeExecution) MarshalJSON() ([]byte, error)

MarshalJSON overridden method to json marshalling to use jsonpb

func (*NodeExecution) UnmarshalJSON

func (in *NodeExecution) UnmarshalJSON(b []byte) error

UnmarshalJSON overridden method to json unmarshalling to use jsonpb

type NodeExecutionClosure

type NodeExecutionClosure struct {
	NodeExec       *NodeExecution          `json:"node_exec,omitempty"`
	ChildNodes     []*NodeExecutionClosure `json:"child_nodes,omitempty"`
	TaskExecutions []*TaskExecutionClosure `json:"task_execs,omitempty"`
	// Inputs for the node
	Inputs map[string]interface{} `json:"inputs,omitempty"`
	// Outputs for the node
	Outputs map[string]interface{} `json:"outputs,omitempty"`
}

NodeExecutionClosure forms a wrapper around admin.NodeExecution and also fetches the childnodes , task execs and input/output on the node executions from the admin api's.

type TaskExecution

type TaskExecution struct {
	*admin.TaskExecution
}

TaskExecution wrapper around admin.TaskExecution

func (*TaskExecution) MarshalJSON

func (in *TaskExecution) MarshalJSON() ([]byte, error)

MarshalJSON overridden method to json marshalling to use jsonpb

func (*TaskExecution) UnmarshalJSON

func (in *TaskExecution) UnmarshalJSON(b []byte) error

UnmarshalJSON overridden method to json unmarshalling to use jsonpb

type TaskExecutionClosure

type TaskExecutionClosure struct {
	*TaskExecution
}

TaskExecutionClosure wrapper around TaskExecution

Jump to

Keyboard shortcuts

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