taskchainservice

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeVFSPath

func NormalizeVFSPath(p string) (string, error)

NormalizeVFSPath returns a clean relative path or an error if it escapes the root.

Types

type Service

type Service interface {
	Get(ctx context.Context, ref string) (*taskengine.TaskChainDefinition, error)
	List(ctx context.Context) ([]string, error)
	CreateAtPath(ctx context.Context, path string, chain *taskengine.TaskChainDefinition) error
	UpdateAtPath(ctx context.Context, path string, chain *taskengine.TaskChainDefinition) error
	DeleteByPath(ctx context.Context, path string) error
}

Service loads and stores task chain definitions as JSON in the VFS (see NewVFS). Get accepts either a relative VFS path (e.g. default-chain.json) or a logical chain id (inner JSON "id") by scanning root-level *.json files.

func NewVFS

func NewVFS(vfs vfsservice.Service) Service

NewVFS returns a Service backed by the given VFS. vfs must be the same instance used for file APIs.

func WithActivityTracker

func WithActivityTracker(service Service, tracker libtracker.ActivityTracker) Service

WithActivityTracker wraps a task chain service with activity tracking capabilities.

Jump to

Keyboard shortcuts

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