router

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(
	logger polylog.Logger,
	gateway gatewayHandler,
	disqualifiedEndpointsReporter disqualifiedEndpointsReporter,
	healthChecker *health.Checker,
	config config.RouterConfig,
) *router

NewRouter creates a new router instance

Types

type ConfigReporter added in v1.0.10

type ConfigReporter interface {
	// GetSanitizedConfig returns a sanitized view of the active configuration.
	// All sensitive information (private keys, passwords) MUST be redacted.
	GetSanitizedConfig() map[string]interface{}
}

ConfigReporter provides sanitized configuration information. Implemented by components that can report their active configuration.

type ServiceReadinessReporter added in v1.0.10

type ServiceReadinessReporter interface {
	// GetServiceReadiness returns readiness info for a specific service.
	// Returns endpoint count, whether sessions are available, and any error.
	GetServiceReadiness(serviceID protocol.ServiceID) (endpointCount int, hasSession bool, err error)

	// ConfiguredServiceIDs returns all configured service IDs.
	ConfiguredServiceIDs() map[protocol.ServiceID]struct{}
}

ServiceReadinessReporter provides readiness information for services. Implemented by the protocol to report session and endpoint availability.

type ServiceReadinessResponse added in v1.0.10

type ServiceReadinessResponse struct {
	Ready    bool                        `json:"ready"`
	Services map[string]ServiceReadyInfo `json:"services,omitempty"`
	Message  string                      `json:"message,omitempty"`
}

ServiceReadinessResponse is the JSON response for /ready endpoints.

type ServiceReadyInfo added in v1.0.10

type ServiceReadyInfo struct {
	Ready         bool   `json:"ready"`
	EndpointCount int    `json:"endpoint_count"`
	HasSession    bool   `json:"has_session"`
	Error         string `json:"error,omitempty"`
}

ServiceReadyInfo contains readiness info for a single service.

Jump to

Keyboard shortcuts

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