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 ¶
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".