vxchrono

package
v0.1.0-preview Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package vxchrono is the resource module for VxChrono — the autonomous goal executor and scheduler. Create goals, attach cron/interval schedules, launch runs, and drive run lifecycle.

Endpoints (all on the per-tenant node):

POST   /api/v2/vxchrono/init
GET    /api/v2/vxchrono/goals
POST   /api/v2/vxchrono/goals
GET    /api/v2/vxchrono/goals/{id}
PATCH  /api/v2/vxchrono/goals/{id}
DELETE /api/v2/vxchrono/goals/{id}
POST   /api/v2/vxchrono/goals/{id}/schedule
POST   /api/v2/vxchrono/goals/{id}/run
GET    /api/v2/vxchrono/runs/{id}
POST   /api/v2/vxchrono/runs/{id}/pause|resume|stop
POST   /api/v2/vxchrono/scheduler/dispatch

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	T       *transport.Transport
	NodeURL string
}

Client is the entry point. Construct via c.VxChrono().

func (*Client) CreateGoal

func (c *Client) CreateGoal(ctx context.Context, goal map[string]interface{}) (Result, error)

CreateGoal creates a new autonomous goal.

func (*Client) DeleteGoal

func (c *Client) DeleteGoal(ctx context.Context, goalID string) (Result, error)

DeleteGoal deletes a goal.

func (*Client) DispatchScheduler

func (c *Client) DispatchScheduler(ctx context.Context) (Result, error)

DispatchScheduler ticks the scheduler once — fires any goals whose next_run_at has elapsed.

func (*Client) GetGoal

func (c *Client) GetGoal(ctx context.Context, goalID string) (Result, error)

GetGoal returns one goal's detail.

func (*Client) GetRun

func (c *Client) GetRun(ctx context.Context, runID string) (Result, error)

GetRun returns one run's detail.

func (*Client) Init

func (c *Client) Init(ctx context.Context) (Result, error)

Init initializes VxChrono for the tenant (idempotent).

func (*Client) LaunchRun

func (c *Client) LaunchRun(ctx context.Context, goalID string, payload map[string]interface{}) (Result, error)

LaunchRun launches a run for a goal. payload may be nil.

func (*Client) ListGoals

func (c *Client) ListGoals(ctx context.Context) (Result, error)

ListGoals returns all goals for the tenant.

func (*Client) PauseRun

func (c *Client) PauseRun(ctx context.Context, runID string) (Result, error)

PauseRun pauses an in-flight run.

func (*Client) ResumeRun

func (c *Client) ResumeRun(ctx context.Context, runID string) (Result, error)

ResumeRun resumes a paused run.

func (*Client) Schedule

func (c *Client) Schedule(ctx context.Context, goalID string, schedule map[string]interface{}) (Result, error)

Schedule attaches a cron/interval schedule to a goal.

func (*Client) StopRun

func (c *Client) StopRun(ctx context.Context, runID string) (Result, error)

StopRun stops a run.

func (*Client) UpdateGoal

func (c *Client) UpdateGoal(ctx context.Context, goalID string, patch map[string]interface{}) (Result, error)

UpdateGoal patches a goal.

type Result

type Result = map[string]interface{}

Result is a decoded JSON object response.

Jump to

Keyboard shortcuts

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