autoflow

package
v19.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "autoflow"
)

Variables

View Source
var ErrInlineNotAllowed = errors.New("only a built-in module may declare an action inlineable")

ErrInlineNotAllowed is returned for a module descriptor that declares an action inlineable without being entitled to: only an in-process (built-in) module may, because an inline body runs in the workflow goroutine and stalls its round.

Functions

This section is empty.

Types

type CompositeModuleManager added in v19.1.0

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

func NewCompositeModuleManager added in v19.1.0

func NewCompositeModuleManager(delegate flowcore.ModuleManager, modules map[int64]pkg_autoflow.Module) *CompositeModuleManager

NewCompositeModuleManager builds a module manager that serves the given built-in modules in-process and delegates everything else. The map key is the built-in module's agent id.

func (*CompositeModuleManager) InvokeAction added in v19.1.0

func (m *CompositeModuleManager) InvokeAction(
	ctx context.Context,
	agentKey api.AgentKey,
	actionName, workflowKey, idempotencyKey string,
	args []*pkg_autoflow.Value,
	kwargs []*pkg_autoflow.Kwarg,
	channelTokens []*pkg_autoflow.ChannelToken,
) (*pkg_autoflow.Result, error)

func (*CompositeModuleManager) LoadModuleDescriptor added in v19.1.0

func (m *CompositeModuleManager) LoadModuleDescriptor(ctx context.Context, moduleName string) (*flowcore.RegisteredModuleDescriptor, error)

type RedisModuleRegistry added in v19.1.0

type RedisModuleRegistry struct {
	Client    rueidis.Client
	KeyPrefix string
	TTL       time.Duration
	Validator protovalidate.Validator
}

RedisModuleRegistry registers AutoFlow modules in Redis. A module's descriptor can be looked up by name.

func (*RedisModuleRegistry) LoadModuleDescriptor added in v19.1.0

func (r *RedisModuleRegistry) LoadModuleDescriptor(ctx context.Context, moduleName string) (*flowcore.RegisteredModuleDescriptor, error)

LoadModuleDescriptor loads a module descriptor from Redis. Returns (nil, nil) if not found.

func (*RedisModuleRegistry) RegisterDescriptor added in v19.1.0

func (r *RedisModuleRegistry) RegisterDescriptor(ctx context.Context, moduleName string, desc *flowcore.RegisteredModuleDescriptor) error

type RemoteModuleClient added in v19.1.0

type RemoteModuleClient struct {
	AgentConnPool func(api.AgentKey) grpc.ClientConnInterface
}

func (*RemoteModuleClient) InvokeAction added in v19.1.0

InvokeAction sends a request to a matching agent.

This method uses the simplified tunneling approach. A Remote AutoFlow Module client for that agent key must have an open InvokeAction RPC call to any Relay. The req is routed through a gateway Relay (potentially itself) to that client. This method must send the RPC messages in reversed order - meaning that the actually defined RPC "response" becomes this client's request and the vice versa.

type RemoteModuleManager added in v19.1.0

type RemoteModuleManager struct {
	ModuleClient *RemoteModuleClient
	Registry     *RedisModuleRegistry
}

func (*RemoteModuleManager) InvokeAction added in v19.1.0

func (m *RemoteModuleManager) InvokeAction(
	ctx context.Context,
	agentKey api.AgentKey,
	actionName, workflowKey, idempotencyKey string,
	args []*pkg_autoflow.Value,
	kwargs []*pkg_autoflow.Kwarg,
	channelTokens []*pkg_autoflow.ChannelToken,
) (*pkg_autoflow.Result, error)

func (*RemoteModuleManager) LoadModuleDescriptor added in v19.1.0

func (m *RemoteModuleManager) LoadModuleDescriptor(ctx context.Context, moduleName string) (*flowcore.RegisteredModuleDescriptor, error)

Directories

Path Synopsis
event
Package event implements the built-in AutoFlow module that emits events to the Events Platform.
Package event implements the built-in AutoFlow module that emits events to the Events Platform.
gitlab
Package gitlab implements the built-in AutoFlow module that calls the GitLab REST API.
Package gitlab implements the built-in AutoFlow module that calls the GitLab REST API.
kubernetes
Package kubernetes implements the built-in AutoFlow module that reads objects from the Kubernetes API of a cluster reachable through an agentk.
Package kubernetes implements the built-in AutoFlow module that reads objects from the Kubernetes API of a cluster reachable through an agentk.
modtool
Package modtool holds conversions between AutoFlow values and the pieces of an HTTP request and response, shared by the built-in modules that call an API.
Package modtool holds conversions between AutoFlow values and the pieces of an HTTP request and response, shared by the built-in modules that call an API.
policy
Package policy implements the built-in AutoFlow module that asks the governance decision API whether an action is allowed.
Package policy implements the built-in AutoFlow module that asks the governance decision API whether an action is allowed.

Jump to

Keyboard shortcuts

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