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 ¶
const MaxArtifact = 8 << 20
MaxArtifact is the largest file GetArtifact sends, since a unary message carries the whole file.
Variables ¶
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 ¶
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.