scheduler

package
v1.164.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ToolNameCreateSchedule = "create_schedule"
	ToolNameListSchedules  = "list_schedules"
	ToolNameCancelSchedule = "cancel_schedule"
)

Variables

This section is empty.

Functions

func CreateToolSet

func CreateToolSet() (tools.ToolSet, error)

Types

type CancelScheduleArgs

type CancelScheduleArgs struct {
	ID string `json:"id" jsonschema:"The id of the schedule to cancel (from create_schedule or list_schedules)"`
}

type CreateScheduleArgs

type CreateScheduleArgs struct {
	Prompt string `json:"prompt" jsonschema:"The instruction to deliver to the agent when the schedule fires"`
	When   string `` /* 190-byte string literal not displayed */
	Name   string `json:"name,omitempty" jsonschema:"Optional human-readable label for the schedule"`
}

type ListSchedulesArgs

type ListSchedulesArgs struct{}

type Schedule

type Schedule struct {
	ID       string        `json:"id"`
	Name     string        `json:"name,omitempty"`
	Prompt   string        `json:"prompt"`
	Spec     string        `json:"spec"`
	Interval time.Duration `json:"-"`
	NextFire time.Time     `json:"next_fire"`
}

func (Schedule) Recurring

func (s Schedule) Recurring() bool

type ToolSet

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

func New

func New() *ToolSet

func (*ToolSet) Instructions

func (t *ToolSet) Instructions() string

func (*ToolSet) Run added in v1.153.0

func (t *ToolSet) Run(ctx context.Context)

Run delivers due schedules until ctx is canceled. The caller owns the run and must wait for it to return before starting another.

func (*ToolSet) Tools

func (t *ToolSet) Tools(context.Context) ([]tools.Tool, error)

Jump to

Keyboard shortcuts

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