teleport

package
v0.265.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 23 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Identity        string
	ProjectsRoot    string
	IdleExit        time.Duration
	Version         string
	StorageID       string
	LeaseBackend    config.StorageType
	Handshake       agui.Handshake
	Entries         []config.WorkspaceEntry
	StateDir        string
	Denies          func(projectDir, absPath string) bool
	VoiceSamplesDir string
}

Config is what the daemon tells the service about itself. LeaseBackend names the lease store's storage type, StateDir keeps what it remembers about sessions it sent away, Denies keeps sandbox-denied files out of a checkpoint, and VoiceSamplesDir is the voice library a teleport may carry.

type Deps

type Deps struct {
	Leases     agentdomain.LeaseStore
	Workspaces []agentdomain.Workspace
	Keyring    *agentinfra.Keyring
	Launch     sessionsdomain.LaunchWorker
}

Deps are the collaborators the service orchestrates.

type Service

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

Service runs agents on workspaces: it decides where a thread's worker runs (the launch seam the registry calls), teleports sessions between workspaces, and receives the sessions other daemons teleport here.

func New

func New(cfg Config, deps Deps) *Service

New builds the service. AttachRegistry must follow once the registry exists, since the registry itself is built over LaunchWorker.

func (*Service) AckAttrs

func (s *Service) AckAttrs() map[string]any

AckAttrs are the facts the binding's ack declares about this daemon.

func (*Service) AttachRegistry

func (s *Service) AttachRegistry(registry *sessions.Registry)

AttachRegistry hands the service the thread registry its teleports quiesce, ask and notify.

func (*Service) Handle

func (s *Service) Handle(conn agentinfra.PeerConn, frame []byte) bool

Handle claims the workspaces and teleports frames: the client requests, and the peer frames when the connection is another daemon's, whichever protocol the connection rides.

func (*Service) LaunchWorker

LaunchWorker is the seam the registry launches threads through. It answers at once with a worker that connects in the background: to a process here when this daemon owns the session or nobody does, to the owning workspace's daemon when another one does. The registry holds its lock while launching, so nothing here may block.

func (*Service) StopSession

func (s *Service) StopSession(ctx context.Context, to requester, key sessionsdomain.ThreadKey)

StopSession handles a client dropping a session: when a remote workspace owns it, the session's runtime there is deleted and the lease released, so the session starts here next time, and a session that came home has the runtime it left behind deleted. The client gets thread_stopped, naming the workspace whose runtime went or the error that kept it.

Jump to

Keyboard shortcuts

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