Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeVFSPath ¶
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.
Click to show internal directories.
Click to hide internal directories.