controlapi

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package controlapi serves the control surface that control-core opened.

It owns the REST listener, the global WebSocket hub, the metrics listener, and the readiness gate. It creates no durable state of its own.

Index

Constants

View Source
const (
	// ServiceName is the servicepack registration key and log scope.
	ServiceName = control.APIServiceName
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlAPI

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

ControlAPI serves the control REST API, the global WebSocket feed, and the metrics endpoint over the state control-core owns.

func New

func New() (*ControlAPI, error)

New builds the service through servicepack's generated registration.

func (*ControlAPI) Dependencies

func (s *ControlAPI) Dependencies() []string

Dependencies orders this service after control-core, so the durable store and runtime exist before the API accepts a request.

func (*ControlAPI) Name

func (s *ControlAPI) Name() string

func (*ControlAPI) Ready

func (s *ControlAPI) Ready() <-chan struct{}

Ready closes once the configured endpoint is accepting connections. A client that auto-starts the controller can then treat readiness as "the API answers" rather than "a goroutine was scheduled".

func (*ControlAPI) Run

func (s *ControlAPI) Run(ctx context.Context) error

Run serves the control API until the context ends.

func (*ControlAPI) Stop

func (s *ControlAPI) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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