provisioner

package
v1.357.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package provisioner provides an HTTP server that provisions session Pods. The agent-provisioner starts this server on startup. The proxy server calls POST /provision with session settings JSON to trigger the startup sequence (setup + agentapi launch + initial message sending).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is the agent-provisioner HTTP server.

func New

func New(port int, settingsFile string) *Server

New creates a new Server.

  • port: TCP port to listen on (e.g. 9001)
  • settingsFile: path to /session-settings/settings.yaml; if this file exists at startup the server auto-provisions from it (Pod restart case).

func (*Server) GetStatus

func (s *Server) GetStatus() Status

GetStatus returns the current status (used by tests).

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start starts the HTTP server and blocks until ctx is cancelled or a fatal error occurs.

If settingsFile exists at startup (Pod restart case), provisioning is started automatically in the background before the HTTP server begins accepting requests.

type Status

type Status string

Status represents the provisioning lifecycle state.

const (
	// StatusPending means no provisioning has been triggered yet.
	StatusPending Status = "pending"
	// StatusProvisioning means provisioning is currently in progress.
	StatusProvisioning Status = "provisioning"
	// StatusReady means provisioning completed successfully and agentapi is running.
	StatusReady Status = "ready"
	// StatusError means provisioning failed.
	StatusError Status = "error"
)

type StatusResponse

type StatusResponse struct {
	Status  Status `json:"status"`
	Message string `json:"message,omitempty"`
}

StatusResponse is the JSON body returned by GET /status.

Jump to

Keyboard shortcuts

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