engine

package
v17.3.0-rc43 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MIT Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_internal_module_autoflow_engine_engine_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(opts Options) (*Engine, error)

func (*Engine) Event

func (e *Engine) Event(ctx context.Context, req *rpc.CloudEventRequest) error

func (*Engine) Run

func (e *Engine) Run(ctx context.Context) error

type HandleEventWorkflowInput

type HandleEventWorkflowInput struct {
	Event       *event.CloudEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
	FlowProject *event.Project    `protobuf:"bytes,2,opt,name=flow_project,json=flowProject,proto3" json:"flow_project,omitempty"`
	Entrypoint  string            `protobuf:"bytes,3,opt,name=entrypoint,proto3" json:"entrypoint,omitempty"`
	// contains filtered or unexported fields
}

func (*HandleEventWorkflowInput) Descriptor deprecated

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

Deprecated: Use HandleEventWorkflowInput.ProtoReflect.Descriptor instead.

func (*HandleEventWorkflowInput) GetEntrypoint

func (x *HandleEventWorkflowInput) GetEntrypoint() string

func (*HandleEventWorkflowInput) GetEvent

func (x *HandleEventWorkflowInput) GetEvent() *event.CloudEvent

func (*HandleEventWorkflowInput) GetFlowProject

func (x *HandleEventWorkflowInput) GetFlowProject() *event.Project

func (*HandleEventWorkflowInput) ProtoMessage

func (*HandleEventWorkflowInput) ProtoMessage()

func (*HandleEventWorkflowInput) ProtoReflect

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

func (*HandleEventWorkflowInput) Reset

func (x *HandleEventWorkflowInput) Reset()

func (*HandleEventWorkflowInput) String

func (x *HandleEventWorkflowInput) String() string

type HandleEventWorkflowOutput

type HandleEventWorkflowOutput struct {
	// contains filtered or unexported fields
}

func (*HandleEventWorkflowOutput) Descriptor deprecated

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

Deprecated: Use HandleEventWorkflowOutput.ProtoReflect.Descriptor instead.

func (*HandleEventWorkflowOutput) ProtoMessage

func (*HandleEventWorkflowOutput) ProtoMessage()

func (*HandleEventWorkflowOutput) ProtoReflect

func (*HandleEventWorkflowOutput) Reset

func (x *HandleEventWorkflowOutput) Reset()

func (*HandleEventWorkflowOutput) String

func (x *HandleEventWorkflowOutput) String() string

type HandlerInfo

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

func (*HandlerInfo) Descriptor deprecated

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

Deprecated: Use HandlerInfo.ProtoReflect.Descriptor instead.

func (*HandlerInfo) GetWorkflowId

func (x *HandlerInfo) GetWorkflowId() string

func (*HandlerInfo) ProtoMessage

func (*HandlerInfo) ProtoMessage()

func (*HandlerInfo) ProtoReflect

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

func (*HandlerInfo) Reset

func (x *HandlerInfo) Reset()

func (*HandlerInfo) String

func (x *HandlerInfo) String() string

type HttpDoActivityInput

type HttpDoActivityInput struct {
	Method string             `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	Url    string             `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	Header map[string]*Values `` /* 153-byte string literal not displayed */
	Body   []byte             `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*HttpDoActivityInput) Descriptor deprecated

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

Deprecated: Use HttpDoActivityInput.ProtoReflect.Descriptor instead.

func (*HttpDoActivityInput) GetBody

func (x *HttpDoActivityInput) GetBody() []byte

func (*HttpDoActivityInput) GetHeader

func (x *HttpDoActivityInput) GetHeader() map[string]*Values

func (*HttpDoActivityInput) GetMethod

func (x *HttpDoActivityInput) GetMethod() string

func (*HttpDoActivityInput) GetUrl

func (x *HttpDoActivityInput) GetUrl() string

func (*HttpDoActivityInput) ProtoMessage

func (*HttpDoActivityInput) ProtoMessage()

func (*HttpDoActivityInput) ProtoReflect

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

func (*HttpDoActivityInput) Reset

func (x *HttpDoActivityInput) Reset()

func (*HttpDoActivityInput) String

func (x *HttpDoActivityInput) String() string

type HttpDoActivityOutput

type HttpDoActivityOutput struct {
	StatusCode uint32             `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	Status     string             `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	Header     map[string]*Values `` /* 153-byte string literal not displayed */
	Body       []byte             `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*HttpDoActivityOutput) Descriptor deprecated

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

Deprecated: Use HttpDoActivityOutput.ProtoReflect.Descriptor instead.

func (*HttpDoActivityOutput) GetBody

func (x *HttpDoActivityOutput) GetBody() []byte

func (*HttpDoActivityOutput) GetHeader

func (x *HttpDoActivityOutput) GetHeader() map[string]*Values

func (*HttpDoActivityOutput) GetStatus

func (x *HttpDoActivityOutput) GetStatus() string

func (*HttpDoActivityOutput) GetStatusCode

func (x *HttpDoActivityOutput) GetStatusCode() uint32

func (*HttpDoActivityOutput) ProtoMessage

func (*HttpDoActivityOutput) ProtoMessage()

func (*HttpDoActivityOutput) ProtoReflect

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

func (*HttpDoActivityOutput) Reset

func (x *HttpDoActivityOutput) Reset()

func (*HttpDoActivityOutput) String

func (x *HttpDoActivityOutput) String() string

type LoadAllEventHandlersActivityInput

type LoadAllEventHandlersActivityInput struct {
	Event       *event.CloudEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
	FlowProject *event.Project    `protobuf:"bytes,2,opt,name=flow_project,json=flowProject,proto3" json:"flow_project,omitempty"`
	Entrypoint  string            `protobuf:"bytes,3,opt,name=entrypoint,proto3" json:"entrypoint,omitempty"`
	// contains filtered or unexported fields
}

func (*LoadAllEventHandlersActivityInput) Descriptor deprecated

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

Deprecated: Use LoadAllEventHandlersActivityInput.ProtoReflect.Descriptor instead.

func (*LoadAllEventHandlersActivityInput) GetEntrypoint

func (x *LoadAllEventHandlersActivityInput) GetEntrypoint() string

func (*LoadAllEventHandlersActivityInput) GetEvent

func (*LoadAllEventHandlersActivityInput) GetFlowProject

func (x *LoadAllEventHandlersActivityInput) GetFlowProject() *event.Project

func (*LoadAllEventHandlersActivityInput) ProtoMessage

func (*LoadAllEventHandlersActivityInput) ProtoMessage()

func (*LoadAllEventHandlersActivityInput) ProtoReflect

func (*LoadAllEventHandlersActivityInput) Reset

func (*LoadAllEventHandlersActivityInput) String

type LoadAllEventHandlersActivityOutput

type LoadAllEventHandlersActivityOutput struct {
	Handlers []*HandlerInfo  `protobuf:"bytes,1,rep,name=handlers,proto3" json:"handlers,omitempty"`
	Modules  []*ModuleSource `protobuf:"bytes,2,rep,name=modules,proto3" json:"modules,omitempty"`
	// contains filtered or unexported fields
}

func (*LoadAllEventHandlersActivityOutput) Descriptor deprecated

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

Deprecated: Use LoadAllEventHandlersActivityOutput.ProtoReflect.Descriptor instead.

func (*LoadAllEventHandlersActivityOutput) GetHandlers

func (x *LoadAllEventHandlersActivityOutput) GetHandlers() []*HandlerInfo

func (*LoadAllEventHandlersActivityOutput) GetModules

func (*LoadAllEventHandlersActivityOutput) ProtoMessage

func (*LoadAllEventHandlersActivityOutput) ProtoMessage()

func (*LoadAllEventHandlersActivityOutput) ProtoReflect

func (*LoadAllEventHandlersActivityOutput) Reset

func (*LoadAllEventHandlersActivityOutput) String

type ModuleSource

type ModuleSource struct {
	SourceName string `protobuf:"bytes,1,opt,name=source_name,json=sourceName,proto3" json:"source_name,omitempty"`
	File       string `protobuf:"bytes,2,opt,name=file,proto3" json:"file,omitempty"`
	Data       []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*ModuleSource) Descriptor deprecated

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

Deprecated: Use ModuleSource.ProtoReflect.Descriptor instead.

func (*ModuleSource) GetData

func (x *ModuleSource) GetData() []byte

func (*ModuleSource) GetFile

func (x *ModuleSource) GetFile() string

func (*ModuleSource) GetSourceName

func (x *ModuleSource) GetSourceName() string

func (*ModuleSource) ProtoMessage

func (*ModuleSource) ProtoMessage()

func (*ModuleSource) ProtoReflect

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

func (*ModuleSource) Reset

func (x *ModuleSource) Reset()

func (*ModuleSource) String

func (x *ModuleSource) String() string

type Options

type Options struct {
	Log           *slog.Logger
	TC            tclient.Client
	GitalyPool    gitaly.PoolInterface
	GitLabClient  gitlab.ClientInterface
	RepoInfoCache *cache.CacheWithErr[RepoInfoCacheKey, *api.ProjectInfo]
	HTTPRT        http.RoundTripper
	TaskQueue     string
	// Must not have / at the end.
	GitLabURL string
}

type RepoInfoCacheKey

type RepoInfoCacheKey struct {
	// TODO identity must be part of the cache key
	ProjectID string
}

type RunEventHandlerWorkflowInput

type RunEventHandlerWorkflowInput struct {
	Event            *event.CloudEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
	FlowProject      *event.Project    `protobuf:"bytes,2,opt,name=flow_project,json=flowProject,proto3" json:"flow_project,omitempty"`
	Entrypoint       string            `protobuf:"bytes,3,opt,name=entrypoint,proto3" json:"entrypoint,omitempty"`
	Modules          []*ModuleSource   `protobuf:"bytes,4,rep,name=modules,proto3" json:"modules,omitempty"`
	Handler          uint32            `protobuf:"varint,5,opt,name=handler,proto3" json:"handler,omitempty"`
	WorkflowIdPrefix string            `protobuf:"bytes,6,opt,name=workflow_id_prefix,json=workflowIdPrefix,proto3" json:"workflow_id_prefix,omitempty"`
	// contains filtered or unexported fields
}

func (*RunEventHandlerWorkflowInput) Descriptor deprecated

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

Deprecated: Use RunEventHandlerWorkflowInput.ProtoReflect.Descriptor instead.

func (*RunEventHandlerWorkflowInput) GetEntrypoint

func (x *RunEventHandlerWorkflowInput) GetEntrypoint() string

func (*RunEventHandlerWorkflowInput) GetEvent

func (*RunEventHandlerWorkflowInput) GetFlowProject

func (x *RunEventHandlerWorkflowInput) GetFlowProject() *event.Project

func (*RunEventHandlerWorkflowInput) GetHandler

func (x *RunEventHandlerWorkflowInput) GetHandler() uint32

func (*RunEventHandlerWorkflowInput) GetModules

func (x *RunEventHandlerWorkflowInput) GetModules() []*ModuleSource

func (*RunEventHandlerWorkflowInput) GetWorkflowIdPrefix

func (x *RunEventHandlerWorkflowInput) GetWorkflowIdPrefix() string

func (*RunEventHandlerWorkflowInput) ProtoMessage

func (*RunEventHandlerWorkflowInput) ProtoMessage()

func (*RunEventHandlerWorkflowInput) ProtoReflect

func (*RunEventHandlerWorkflowInput) Reset

func (x *RunEventHandlerWorkflowInput) Reset()

func (*RunEventHandlerWorkflowInput) String

type RunEventHandlerWorkflowOutput

type RunEventHandlerWorkflowOutput struct {
	// contains filtered or unexported fields
}

func (*RunEventHandlerWorkflowOutput) Descriptor deprecated

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

Deprecated: Use RunEventHandlerWorkflowOutput.ProtoReflect.Descriptor instead.

func (*RunEventHandlerWorkflowOutput) ProtoMessage

func (*RunEventHandlerWorkflowOutput) ProtoMessage()

func (*RunEventHandlerWorkflowOutput) ProtoReflect

func (*RunEventHandlerWorkflowOutput) Reset

func (x *RunEventHandlerWorkflowOutput) Reset()

func (*RunEventHandlerWorkflowOutput) String

type SignalPayload

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

func (*SignalPayload) Descriptor deprecated

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

Deprecated: Use SignalPayload.ProtoReflect.Descriptor instead.

func (*SignalPayload) GetPayload

func (x *SignalPayload) GetPayload() string

func (*SignalPayload) ProtoMessage

func (*SignalPayload) ProtoMessage()

func (*SignalPayload) ProtoReflect

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

func (*SignalPayload) Reset

func (x *SignalPayload) Reset()

func (*SignalPayload) String

func (x *SignalPayload) String() string

type Values

type Values struct {
	Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Values) Descriptor deprecated

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

Deprecated: Use Values.ProtoReflect.Descriptor instead.

func (*Values) GetValue

func (x *Values) GetValue() []string

func (*Values) ProtoMessage

func (*Values) ProtoMessage()

func (*Values) ProtoReflect

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

func (*Values) Reset

func (x *Values) Reset()

func (*Values) String

func (x *Values) String() string

Jump to

Keyboard shortcuts

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