api

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: AGPL-3.0 Imports: 2 Imported by: ? 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 defines the versioned Continuum local-alpha contract.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exit

func Exit(class string) int

Types

type Action

type Action struct {
	Kind      string `json:"kind"`
	Operation string `json:"operation"`
}

type GrantSpec

type GrantSpec struct {
	Class  string   `json:"class"`
	Blocks []string `json:"blocks"`
}

type Peer

type Peer struct {
	Name   string `json:"name"`
	Host   string `json:"host"`
	State  string `json:"state"`
	Binary string `json:"binary"`
	HostID string `json:"host_id"`
}

type Request

type Request struct {
	Grant          *GrantSpec `json:"grant,omitempty"`
	GrantID        string     `json:"grant_id,omitempty"`
	Sharing        string     `json:"sharing,omitempty"`
	Peer           *Peer      `json:"peer,omitempty"`
	PeerName       string     `json:"peer_name,omitempty"`
	Wait           *WaitSpec  `json:"wait,omitempty"`
	WaitID         string     `json:"wait_id,omitempty"`
	Text           string     `json:"text,omitempty"`
	PermissionID   string     `json:"permission_id,omitempty"`
	Outcome        string     `json:"outcome,omitempty"`
	OptionID       string     `json:"option_id,omitempty"`
	Path           string     `json:"path,omitempty"`
	Limit          int        `json:"limit,omitempty"`
	Cursor         string     `json:"cursor,omitempty"`
	Terminal       string     `json:"terminal,omitempty"`
	Operation      string     `json:"operation"`
	RequestID      string     `json:"request_id,omitempty"`
	Block          string     `json:"block_id,omitempty"`
	Args           []string   `json:"args,omitempty"`
	Cwd            string     `json:"cwd,omitempty"`
	Encoding       string     `json:"encoding,omitempty"`
	Data           string     `json:"data,omitempty"`
	Lease          string     `json:"lease,omitempty"`
	After          uint64     `json:"after,omitempty"`
	Cols           int        `json:"cols,omitempty"`
	Rows           int        `json:"rows,omitempty"`
	Recording      string     `json:"recording,omitempty"`
	RecordingLines int        `json:"recording_lines,omitempty"`
}

type Response

type Response struct {
	Version    int             `json:"schema_version"`
	RequestID  string          `json:"request_id,omitempty"`
	Class      string          `json:"class"`
	Code       string          `json:"code"`
	Message    string          `json:"message,omitempty"`
	Durability string          `json:"durability"`
	Next       Action          `json:"next_action"`
	Result     json.RawMessage `json:"result,omitempty"`
}

func Error

func Error(id, class, code, message, next string) Response

func Result

func Result(id string, v any) Response

type WaitSource

type WaitSource struct {
	Name  string   `json:"name"`
	Peer  string   `json:"peer"`
	Block string   `json:"block_id"`
	Until []string `json:"until"`
}

Waits are coordinator-owned observations. Peer names resolve through the coordinator's private registry; a caller cannot supply an SSH destination.

type WaitSpec

type WaitSpec struct {
	Mode      string       `json:"mode"`
	DeadlineS int          `json:"deadline_s"`
	Sources   []WaitSource `json:"sources"`
}

Jump to

Keyboard shortcuts

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