workflows

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package workflows includes all proto/service definitions for the Workflows service.

Index

Constants

This section is empty.

Variables

View Source
var (
	Workflow_State_name = map[int32]string{
		0: "STATE_UNSPECIFIED",
		1: "PENDING",
		2: "ONGOING",
		3: "COMPLETED",
		4: "CANCELLED",
	}
	Workflow_State_value = map[string]int32{
		"STATE_UNSPECIFIED": 0,
		"PENDING":           1,
		"ONGOING":           2,
		"COMPLETED":         3,
		"CANCELLED":         4,
	}
)

Enum value maps for Workflow_State.

View Source
var (
	Task_State_name = map[int32]string{
		0: "STATE_UNSPECIFIED",
		1: "PENDING",
		2: "ONGOING",
		3: "FAILED",
		4: "COMPLETED",
		5: "CANCELLED",
	}
	Task_State_value = map[string]int32{
		"STATE_UNSPECIFIED": 0,
		"PENDING":           1,
		"ONGOING":           2,
		"FAILED":            3,
		"COMPLETED":         4,
		"CANCELLED":         5,
	}
)

Enum value maps for Task_State.

View Source
var File_infra_chromeperf_workflows_workflow_templates_proto protoreflect.FileDescriptor
View Source
var File_infra_chromeperf_workflows_workflow_templates_service_proto protoreflect.FileDescriptor
View Source
var File_infra_chromeperf_workflows_workflows_proto protoreflect.FileDescriptor
View Source
var File_infra_chromeperf_workflows_workflows_service_proto protoreflect.FileDescriptor

Functions

func FileDescriptorSet

func FileDescriptorSet() *descriptorpb.FileDescriptorSet

FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.

Will not return nil.

Do NOT modify the returned descriptor.

func RegisterWorkflowTemplatesServer

func RegisterWorkflowTemplatesServer(s prpc.Registrar, srv WorkflowTemplatesServer)

func RegisterWorkflowsServer

func RegisterWorkflowsServer(s prpc.Registrar, srv WorkflowsServer)

Types

type CreateWorkflowRequest

type CreateWorkflowRequest struct {

	// The Workflow to create.
	Workflow *Workflow `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"`
	// A unique identifier for the request. A random UUID is recommended.
	// This is used to ensure request idempotency. If empty, idempotency is not
	// guaranteed.
	RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateWorkflowRequest) Descriptor deprecated

func (*CreateWorkflowRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateWorkflowRequest.ProtoReflect.Descriptor instead.

func (*CreateWorkflowRequest) GetRequestId

func (x *CreateWorkflowRequest) GetRequestId() string

func (*CreateWorkflowRequest) GetWorkflow

func (x *CreateWorkflowRequest) GetWorkflow() *Workflow

func (*CreateWorkflowRequest) ProtoMessage

func (*CreateWorkflowRequest) ProtoMessage()

func (*CreateWorkflowRequest) ProtoReflect

func (x *CreateWorkflowRequest) ProtoReflect() protoreflect.Message

func (*CreateWorkflowRequest) Reset

func (x *CreateWorkflowRequest) Reset()

func (*CreateWorkflowRequest) String

func (x *CreateWorkflowRequest) String() string

type GetWorkflowTemplateRequest

type GetWorkflowTemplateRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetWorkflowTemplateRequest) Descriptor deprecated

func (*GetWorkflowTemplateRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetWorkflowTemplateRequest.ProtoReflect.Descriptor instead.

func (*GetWorkflowTemplateRequest) GetName

func (x *GetWorkflowTemplateRequest) GetName() string

func (*GetWorkflowTemplateRequest) ProtoMessage

func (*GetWorkflowTemplateRequest) ProtoMessage()

func (*GetWorkflowTemplateRequest) ProtoReflect

func (*GetWorkflowTemplateRequest) Reset

func (x *GetWorkflowTemplateRequest) Reset()

func (*GetWorkflowTemplateRequest) String

func (x *GetWorkflowTemplateRequest) String() string

type ListWorkflowTemplatesRequest

type ListWorkflowTemplatesRequest struct {
	PageSize  int32  `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// This allows filtering workflows by name.
	Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

func (*ListWorkflowTemplatesRequest) Descriptor deprecated

func (*ListWorkflowTemplatesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListWorkflowTemplatesRequest.ProtoReflect.Descriptor instead.

func (*ListWorkflowTemplatesRequest) GetFilter

func (x *ListWorkflowTemplatesRequest) GetFilter() string

func (*ListWorkflowTemplatesRequest) GetPageSize

func (x *ListWorkflowTemplatesRequest) GetPageSize() int32

func (*ListWorkflowTemplatesRequest) GetPageToken

func (x *ListWorkflowTemplatesRequest) GetPageToken() string

func (*ListWorkflowTemplatesRequest) ProtoMessage

func (*ListWorkflowTemplatesRequest) ProtoMessage()

func (*ListWorkflowTemplatesRequest) ProtoReflect

func (*ListWorkflowTemplatesRequest) Reset

func (x *ListWorkflowTemplatesRequest) Reset()

func (*ListWorkflowTemplatesRequest) String

type ListWorkflowTemplatesResponse

type ListWorkflowTemplatesResponse struct {
	WorkflowTemplates []*WorkflowTemplate `protobuf:"bytes,1,rep,name=workflow_templates,json=workflowTemplates,proto3" json:"workflow_templates,omitempty"`
	NextPageToken     string              `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	TotalSize         int32               `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"`
	// contains filtered or unexported fields
}

func (*ListWorkflowTemplatesResponse) Descriptor deprecated

func (*ListWorkflowTemplatesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListWorkflowTemplatesResponse.ProtoReflect.Descriptor instead.

func (*ListWorkflowTemplatesResponse) GetNextPageToken

func (x *ListWorkflowTemplatesResponse) GetNextPageToken() string

func (*ListWorkflowTemplatesResponse) GetTotalSize

func (x *ListWorkflowTemplatesResponse) GetTotalSize() int32

func (*ListWorkflowTemplatesResponse) GetWorkflowTemplates

func (x *ListWorkflowTemplatesResponse) GetWorkflowTemplates() []*WorkflowTemplate

func (*ListWorkflowTemplatesResponse) ProtoMessage

func (*ListWorkflowTemplatesResponse) ProtoMessage()

func (*ListWorkflowTemplatesResponse) ProtoReflect

func (*ListWorkflowTemplatesResponse) Reset

func (x *ListWorkflowTemplatesResponse) Reset()

func (*ListWorkflowTemplatesResponse) String

type Task

type Task struct {

	// The name for the task.
	//
	// Format: workflow/{workflow}/task/{task}
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The state of this particular task.
	State Task_State `protobuf:"varint,2,opt,name=state,proto3,enum=workflows.Task_State" json:"state,omitempty"`
	// The creation timestamp for this task.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// The timestamp for the most recent update on the task.
	LastUpdateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_update_time,json=lastUpdateTime,proto3" json:"last_update_time,omitempty"`
	// This is the structured input provided to the Task at creation time.
	Input *structpb.Struct `protobuf:"bytes,5,opt,name=input,proto3" json:"input,omitempty"`
	// This is the structured output at last update time.
	Output *structpb.Struct `protobuf:"bytes,6,opt,name=output,proto3" json:"output,omitempty"`
	// This is the list of Task names which this Task is dependent on.
	Dependencies []string `protobuf:"bytes,7,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
	// contains filtered or unexported fields
}

func (*Task) Descriptor deprecated

func (*Task) Descriptor() ([]byte, []int)

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetCreateTime

func (x *Task) GetCreateTime() *timestamppb.Timestamp

func (*Task) GetDependencies

func (x *Task) GetDependencies() []string

func (*Task) GetInput

func (x *Task) GetInput() *structpb.Struct

func (*Task) GetLastUpdateTime

func (x *Task) GetLastUpdateTime() *timestamppb.Timestamp

func (*Task) GetName

func (x *Task) GetName() string

func (*Task) GetOutput

func (x *Task) GetOutput() *structpb.Struct

func (*Task) GetState

func (x *Task) GetState() Task_State

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

func (x *Task) ProtoReflect() protoreflect.Message

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

type Task_State

type Task_State int32
const (
	Task_STATE_UNSPECIFIED Task_State = 0
	Task_PENDING           Task_State = 1
	Task_ONGOING           Task_State = 2
	Task_FAILED            Task_State = 3
	Task_COMPLETED         Task_State = 4
	Task_CANCELLED         Task_State = 5
)

func (Task_State) Descriptor

func (Task_State) Descriptor() protoreflect.EnumDescriptor

func (Task_State) Enum

func (x Task_State) Enum() *Task_State

func (Task_State) EnumDescriptor deprecated

func (Task_State) EnumDescriptor() ([]byte, []int)

Deprecated: Use Task_State.Descriptor instead.

func (Task_State) Number

func (x Task_State) Number() protoreflect.EnumNumber

func (Task_State) String

func (x Task_State) String() string

func (Task_State) Type

type UnimplementedWorkflowTemplatesServer

type UnimplementedWorkflowTemplatesServer struct {
}

UnimplementedWorkflowTemplatesServer can be embedded to have forward compatible implementations.

func (*UnimplementedWorkflowTemplatesServer) GetWorkflowTemplate

func (*UnimplementedWorkflowTemplatesServer) ListWorkflowTemplates

func (*UnimplementedWorkflowTemplatesServer) ServiceMetadata

type UnimplementedWorkflowsServer

type UnimplementedWorkflowsServer struct {
}

UnimplementedWorkflowsServer can be embedded to have forward compatible implementations.

func (*UnimplementedWorkflowsServer) CreateWorkflow

type Workflow

type Workflow struct {

	// The resource name of the workflow.
	//
	// NOTE: This is system-generated and ignored when provided in a
	// CreateWorkflowRequest.
	//
	// Format: workflows/{name}
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The template name to use to seed the workflow graph.
	//
	// Must be of the form /workflow-templates/<name>.
	Template string `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"`
	// A mapping between a key and values. This is provided to the template when
	// seeding the workflow graph. Validation for the inputs is determined by
	// the field descriptors provided by the workflow template definition.
	Inputs map[string]*structpb.Value `` /* 153-byte string literal not displayed */
	State  Workflow_State             `protobuf:"varint,4,opt,name=state,proto3,enum=workflows.Workflow_State" json:"state,omitempty"`
	// The creation timestamp for the workflow.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// The most recent update time for the
	LastUpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_update_time,json=lastUpdateTime,proto3" json:"last_update_time,omitempty"`
	// Each task in the workflow.
	Tasks []*Task `protobuf:"bytes,7,rep,name=tasks,proto3" json:"tasks,omitempty"`
	// contains filtered or unexported fields
}

func (*Workflow) Descriptor deprecated

func (*Workflow) Descriptor() ([]byte, []int)

Deprecated: Use Workflow.ProtoReflect.Descriptor instead.

func (*Workflow) GetCreateTime

func (x *Workflow) GetCreateTime() *timestamppb.Timestamp

func (*Workflow) GetInputs

func (x *Workflow) GetInputs() map[string]*structpb.Value

func (*Workflow) GetLastUpdateTime

func (x *Workflow) GetLastUpdateTime() *timestamppb.Timestamp

func (*Workflow) GetName

func (x *Workflow) GetName() string

func (*Workflow) GetState

func (x *Workflow) GetState() Workflow_State

func (*Workflow) GetTasks

func (x *Workflow) GetTasks() []*Task

func (*Workflow) GetTemplate

func (x *Workflow) GetTemplate() string

func (*Workflow) ProtoMessage

func (*Workflow) ProtoMessage()

func (*Workflow) ProtoReflect

func (x *Workflow) ProtoReflect() protoreflect.Message

func (*Workflow) Reset

func (x *Workflow) Reset()

func (*Workflow) String

func (x *Workflow) String() string

type WorkflowTemplate

type WorkflowTemplate struct {

	// The name should be unique, of the form /workflow-templates/<name>.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Human-readable name displayed in user interfaces.
	DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// Human-readable description. This shows up in user-infterfaces and may contain some formatting HTML tags (<b>, <i>,
	// <p>) and <a> tags with links.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// This is a list of input fields which describe the inputs required by a template. This will be used in the following
	// scenarios:
	//
	// - In user-interfaces we can create fields of the appropriate types.
	// - When expanding a template with provided inputs, the description here is used to perform type validation.
	//
	// Fields may provide an option named "validation" which can be used to describe certain supported validators.
	//
	// TODO(dberris): Document and implement the support for validators.
	Inputs []*typepb.Field `protobuf:"bytes,4,rep,name=inputs,proto3" json:"inputs,omitempty"`
	// Task Options
	//
	// These options can refer to the inputs provided in `inputs` above using Python-style f-string syntax (i.e. input
	// names surrounded by curly braces `{name}`). We're representing the options as a Struct that can be turned into the
	// inputs that a graph creation function can use.
	//
	// The template instantiator can check whether a string value in the Struct is a reference to a numeric value or enum
	// values based on the field descriptor in `inputs` above and translate those accordingly.
	TaskOptions *structpb.Struct `protobuf:"bytes,5,opt,name=task_options,json=taskOptions,proto3" json:"task_options,omitempty"`
	// Graph Creation Module
	//
	// This is a fully-qualified module name which contains both the TaskOptions definition and `create_graph` function.
	//
	// Note that this is only useful for the Python-based execution engine and can be approximated by future engines by
	// having a fixed catalogue of graph creation functions.
	GraphCreationModule string `protobuf:"bytes,6,opt,name=graph_creation_module,json=graphCreationModule,proto3" json:"graph_creation_module,omitempty"`
	// CRIA (ChRome Infra Auth) groups for which this template can be readable. When empty it will default to the
	// administrators of the service.
	CriaReaders []string `protobuf:"bytes,7,rep,name=cria_readers,json=criaReaders,proto3" json:"cria_readers,omitempty"`
	// contains filtered or unexported fields
}

func (*WorkflowTemplate) Descriptor deprecated

func (*WorkflowTemplate) Descriptor() ([]byte, []int)

Deprecated: Use WorkflowTemplate.ProtoReflect.Descriptor instead.

func (*WorkflowTemplate) GetCriaReaders

func (x *WorkflowTemplate) GetCriaReaders() []string

func (*WorkflowTemplate) GetDescription

func (x *WorkflowTemplate) GetDescription() string

func (*WorkflowTemplate) GetDisplayName

func (x *WorkflowTemplate) GetDisplayName() string

func (*WorkflowTemplate) GetGraphCreationModule

func (x *WorkflowTemplate) GetGraphCreationModule() string

func (*WorkflowTemplate) GetInputs

func (x *WorkflowTemplate) GetInputs() []*typepb.Field

func (*WorkflowTemplate) GetName

func (x *WorkflowTemplate) GetName() string

func (*WorkflowTemplate) GetTaskOptions

func (x *WorkflowTemplate) GetTaskOptions() *structpb.Struct

func (*WorkflowTemplate) ProtoMessage

func (*WorkflowTemplate) ProtoMessage()

func (*WorkflowTemplate) ProtoReflect

func (x *WorkflowTemplate) ProtoReflect() protoreflect.Message

func (*WorkflowTemplate) Reset

func (x *WorkflowTemplate) Reset()

func (*WorkflowTemplate) String

func (x *WorkflowTemplate) String() string

type WorkflowTemplatesClient

type WorkflowTemplatesClient interface {
	GetWorkflowTemplate(ctx context.Context, in *GetWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
	ListWorkflowTemplates(ctx context.Context, in *ListWorkflowTemplatesRequest, opts ...grpc.CallOption) (*ListWorkflowTemplatesResponse, error)
	// What follows are luci-config specific RPC endpoints that are HTTP-transcoded to follow the
	// luci-config protocol. Unfortunately these do not follow the aip.dev guidelines.
	ServiceMetadata(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*config.ServiceDynamicMetadata, error)
	ValidateConfig(ctx context.Context, in *config.ValidationRequestMessage, opts ...grpc.CallOption) (*config.ValidationResponseMessage, error)
}

WorkflowTemplatesClient is the client API for WorkflowTemplates service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewWorkflowTemplatesPRPCClient

func NewWorkflowTemplatesPRPCClient(client *prpc.Client) WorkflowTemplatesClient

type WorkflowTemplatesServer

type WorkflowTemplatesServer interface {
	GetWorkflowTemplate(context.Context, *GetWorkflowTemplateRequest) (*WorkflowTemplate, error)
	ListWorkflowTemplates(context.Context, *ListWorkflowTemplatesRequest) (*ListWorkflowTemplatesResponse, error)
	// What follows are luci-config specific RPC endpoints that are HTTP-transcoded to follow the
	// luci-config protocol. Unfortunately these do not follow the aip.dev guidelines.
	ServiceMetadata(context.Context, *emptypb.Empty) (*config.ServiceDynamicMetadata, error)
	ValidateConfig(context.Context, *config.ValidationRequestMessage) (*config.ValidationResponseMessage, error)
}

WorkflowTemplatesServer is the server API for WorkflowTemplates service.

type Workflow_State

type Workflow_State int32

The state of the workflow.

const (
	Workflow_STATE_UNSPECIFIED Workflow_State = 0
	Workflow_PENDING           Workflow_State = 1
	Workflow_ONGOING           Workflow_State = 2
	Workflow_COMPLETED         Workflow_State = 3
	Workflow_CANCELLED         Workflow_State = 4
)

func (Workflow_State) Descriptor

func (Workflow_State) Enum

func (x Workflow_State) Enum() *Workflow_State

func (Workflow_State) EnumDescriptor deprecated

func (Workflow_State) EnumDescriptor() ([]byte, []int)

Deprecated: Use Workflow_State.Descriptor instead.

func (Workflow_State) Number

func (Workflow_State) String

func (x Workflow_State) String() string

func (Workflow_State) Type

type WorkflowsClient

type WorkflowsClient interface {
	CreateWorkflow(ctx context.Context, in *CreateWorkflowRequest, opts ...grpc.CallOption) (*Workflow, error)
}

WorkflowsClient is the client API for Workflows service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewWorkflowsClient

func NewWorkflowsClient(cc grpc.ClientConnInterface) WorkflowsClient

func NewWorkflowsPRPCClient

func NewWorkflowsPRPCClient(client *prpc.Client) WorkflowsClient

type WorkflowsServer

type WorkflowsServer interface {
	CreateWorkflow(context.Context, *CreateWorkflowRequest) (*Workflow, error)
}

WorkflowsServer is the server API for Workflows service.

Jump to

Keyboard shortcuts

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