engine

package
v17.3.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 42 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 EventWFParams

type EventWFParams 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 (*EventWFParams) Descriptor deprecated

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

Deprecated: Use EventWFParams.ProtoReflect.Descriptor instead.

func (*EventWFParams) GetEntrypoint

func (x *EventWFParams) GetEntrypoint() string

func (*EventWFParams) GetEvent

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

func (*EventWFParams) GetFlowProject

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

func (*EventWFParams) ProtoMessage

func (*EventWFParams) ProtoMessage()

func (*EventWFParams) ProtoReflect

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

func (*EventWFParams) Reset

func (x *EventWFParams) Reset()

func (*EventWFParams) String

func (x *EventWFParams) 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 HttpDoParams

type HttpDoParams 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 (*HttpDoParams) Descriptor deprecated

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

Deprecated: Use HttpDoParams.ProtoReflect.Descriptor instead.

func (*HttpDoParams) GetBody

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

func (*HttpDoParams) GetHeader

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

func (*HttpDoParams) GetMethod

func (x *HttpDoParams) GetMethod() string

func (*HttpDoParams) GetUrl

func (x *HttpDoParams) GetUrl() string

func (*HttpDoParams) ProtoMessage

func (*HttpDoParams) ProtoMessage()

func (*HttpDoParams) ProtoReflect

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

func (*HttpDoParams) Reset

func (x *HttpDoParams) Reset()

func (*HttpDoParams) String

func (x *HttpDoParams) String() string

type HttpDoResult

type HttpDoResult 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 (*HttpDoResult) Descriptor deprecated

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

Deprecated: Use HttpDoResult.ProtoReflect.Descriptor instead.

func (*HttpDoResult) GetBody

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

func (*HttpDoResult) GetHeader

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

func (*HttpDoResult) GetStatus

func (x *HttpDoResult) GetStatus() string

func (*HttpDoResult) GetStatusCode

func (x *HttpDoResult) GetStatusCode() uint32

func (*HttpDoResult) ProtoMessage

func (*HttpDoResult) ProtoMessage()

func (*HttpDoResult) ProtoReflect

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

func (*HttpDoResult) Reset

func (x *HttpDoResult) Reset()

func (*HttpDoResult) String

func (x *HttpDoResult) String() string

type LoadAllEventHandlersParams

type LoadAllEventHandlersParams 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 (*LoadAllEventHandlersParams) Descriptor deprecated

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

Deprecated: Use LoadAllEventHandlersParams.ProtoReflect.Descriptor instead.

func (*LoadAllEventHandlersParams) GetEntrypoint

func (x *LoadAllEventHandlersParams) GetEntrypoint() string

func (*LoadAllEventHandlersParams) GetEvent

func (*LoadAllEventHandlersParams) GetFlowProject

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

func (*LoadAllEventHandlersParams) ProtoMessage

func (*LoadAllEventHandlersParams) ProtoMessage()

func (*LoadAllEventHandlersParams) ProtoReflect

func (*LoadAllEventHandlersParams) Reset

func (x *LoadAllEventHandlersParams) Reset()

func (*LoadAllEventHandlersParams) String

func (x *LoadAllEventHandlersParams) String() string

type LoadAllEventHandlersResult

type LoadAllEventHandlersResult 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 (*LoadAllEventHandlersResult) Descriptor deprecated

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

Deprecated: Use LoadAllEventHandlersResult.ProtoReflect.Descriptor instead.

func (*LoadAllEventHandlersResult) GetHandlers

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

func (*LoadAllEventHandlersResult) GetModules

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

func (*LoadAllEventHandlersResult) ProtoMessage

func (*LoadAllEventHandlersResult) ProtoMessage()

func (*LoadAllEventHandlersResult) ProtoReflect

func (*LoadAllEventHandlersResult) Reset

func (x *LoadAllEventHandlersResult) Reset()

func (*LoadAllEventHandlersResult) String

func (x *LoadAllEventHandlersResult) String() 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 RunEventHandlerWFParams

type RunEventHandlerWFParams 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 (*RunEventHandlerWFParams) Descriptor deprecated

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

Deprecated: Use RunEventHandlerWFParams.ProtoReflect.Descriptor instead.

func (*RunEventHandlerWFParams) GetEntrypoint

func (x *RunEventHandlerWFParams) GetEntrypoint() string

func (*RunEventHandlerWFParams) GetEvent

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

func (*RunEventHandlerWFParams) GetFlowProject

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

func (*RunEventHandlerWFParams) GetHandler

func (x *RunEventHandlerWFParams) GetHandler() uint32

func (*RunEventHandlerWFParams) GetModules

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

func (*RunEventHandlerWFParams) GetWorkflowIdPrefix

func (x *RunEventHandlerWFParams) GetWorkflowIdPrefix() string

func (*RunEventHandlerWFParams) ProtoMessage

func (*RunEventHandlerWFParams) ProtoMessage()

func (*RunEventHandlerWFParams) ProtoReflect

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

func (*RunEventHandlerWFParams) Reset

func (x *RunEventHandlerWFParams) Reset()

func (*RunEventHandlerWFParams) String

func (x *RunEventHandlerWFParams) String() 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