api

package
v0.63.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 54 Imported by: 0 modules, 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

Overview

Package api serves f10's control plane as Connect services: the f10.v1 handlers over the core packages, and the agents.v1 ones from the agents core, on one mux the daemon mounts on its socket.

Index

Constants

View Source
const MaxArtifact = 8 << 20

MaxArtifact is the largest file GetArtifact sends, since a unary message carries the whole file.

Variables

View Source
var EventPoll = 250 * time.Millisecond

EventPoll is how often a stream reads the ledger again once its backlog is sent. The ledger is SQLite written by many processes, so nothing in this one can say a row landed; an idle read costs a stat and a rowid lookup. A variable so tests need not wait.

Functions

func EventOf

func EventOf(e ledger.Event) (*f10v1.Event, error)

EventOf is a ledger row as f10.v1 carries it, its payload the kind's message as the ledger decodes it. A kind with no payload case, or a row that does not decode, arrives with kind set and no payload; a row a newer f10 wrote arrives with what this one read of it.

func Handler

func Handler(sup Supervisor) http.Handler

Handler is every service on one mux, over sup.

Types

type Supervisor

type Supervisor interface {
	Status() daemon.Status
	WatchProject(root, dir string, env []string) (string, error)
	RunDrive(spec daemon.DriveSpec) (daemon.Started, error)
	ResumeDrive(root, dir string, env []string, n int) (daemon.Started, error)
	SessionEnv() []string
	Remember(env []string)
}

Supervisor is what the handlers need of the daemon: who it is, the drives and watches it runs, and the session environment Herdr calls run under, which a local caller's session replaces.

Jump to

Keyboard shortcuts

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