adoption

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager handles agent registration and adoption with the orchestrator.

func New

func New(orchestratorURL, fqdn, dataDir string, apiPort int) (*Manager, error)

New creates a Manager, loading or generating the agent token and ID.

func (*Manager) AgentID

func (m *Manager) AgentID() string

AgentID returns the agent ID.

func (*Manager) Register

func (m *Manager) Register(ctx context.Context) error

Register sends a registration request to the orchestrator.

func (*Manager) SetCapabilities

func (m *Manager) SetCapabilities(c *models.ProxyCapabilities)

SetCapabilities records the backend capability matrix (§8) carried in the registration request, so the orchestrator can store it on the agent row from first contact (it is also refreshed on every heartbeat).

func (*Manager) SetDetection

func (m *Manager) SetDetection(d *models.ProxyDetection)

SetDetection records the read-only proxy detection result carried in the registration request, so the orchestrator can store it on the agent row from first contact (it is also refreshed on every heartbeat).

func (*Manager) SetVersion

func (m *Manager) SetVersion(v string)

SetVersion records the agent build version sent during registration.

func (*Manager) Token

func (m *Manager) Token() string

Token returns the agent token.

func (*Manager) WaitForAdoption

func (m *Manager) WaitForAdoption(ctx context.Context) error

WaitForAdoption polls the orchestrator until the agent is adopted.

Jump to

Keyboard shortcuts

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