Documentation
¶
Index ¶
- type APIStatusError
- func (e *APIStatusError) Code() string
- func (e *APIStatusError) Detail() string
- func (e *APIStatusError) Error() string
- func (e *APIStatusError) Message() string
- func (e *APIStatusError) Mitigation() string
- func (e *APIStatusError) Status() string
- func (e *APIStatusError) StatusCode() int
- func (e *APIStatusError) Type() string
- type MetadataStatusError
- type Poller
- type TunnelMetadata
- type TunnelServiceClient
- func (c *TunnelServiceClient) FetchTunnelMetadata(ctx context.Context) (*TunnelMetadata, error)
- func (c *TunnelServiceClient) Poll(ctx context.Context, limit int) ([]controlplane.PolledCommand, types.TunnelServiceRequestID, error)
- func (c *TunnelServiceClient) PostResponse(ctx context.Context, requestID types.RequestID, response *types.TunnelResponse) (types.TunnelServiceRequestID, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIStatusError ¶
type APIStatusError struct {
// contains filtered or unexported fields
}
func (*APIStatusError) Code ¶
func (e *APIStatusError) Code() string
func (*APIStatusError) Detail ¶
func (e *APIStatusError) Detail() string
func (*APIStatusError) Error ¶
func (e *APIStatusError) Error() string
func (*APIStatusError) Message ¶
func (e *APIStatusError) Message() string
func (*APIStatusError) Mitigation ¶
func (e *APIStatusError) Mitigation() string
func (*APIStatusError) Status ¶
func (e *APIStatusError) Status() string
func (*APIStatusError) StatusCode ¶
func (e *APIStatusError) StatusCode() int
func (*APIStatusError) Type ¶
func (e *APIStatusError) Type() string
type MetadataStatusError ¶
type MetadataStatusError = APIStatusError
type Poller ¶
Poller exposes the polling loop to callers outside this package.
func NewPoller ¶
func NewPoller(q queue, fetcher controlplane.Fetcher, logger *slog.Logger, meter metric.Meter, pollTimeout, pollDeadlineGuardrail, backoffMin, backoffMax time.Duration) (Poller, error)
NewPoller builds a Poller with sensible defaults for retry and queue backpressure handling. A nil logger defaults to slog.Default(). backoffMin / backoffMax override the default retry window when non-zero; zero values preserve defaults.
type TunnelMetadata ¶
type TunnelMetadata struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
}
TunnelMetadata captures the minimal tunnel metadata needed for boot logging.
type TunnelServiceClient ¶
type TunnelServiceClient struct {
// contains filtered or unexported fields
}
TunnelServiceClient implements the Fetcher and Responder interfaces backed by the control-plane HTTP API.
func NewTunnelServiceClient ¶
func NewTunnelServiceClient(ctx context.Context, cfg *config.ControlPlaneConfig, tlsBundle *tlsconfig.Bundle, logger *slog.Logger, loggingCfg *config.LoggingConfig, meterProvider otelmetric.MeterProvider) (*TunnelServiceClient, error)
NewTunnelServiceClient constructs an HTTP-backed client using the provided config.
func (*TunnelServiceClient) FetchTunnelMetadata ¶
func (c *TunnelServiceClient) FetchTunnelMetadata(ctx context.Context) (*TunnelMetadata, error)
FetchTunnelMetadata requests the tunnel metadata record for the configured tunnel.
func (*TunnelServiceClient) Poll ¶
func (c *TunnelServiceClient) Poll(ctx context.Context, limit int) ([]controlplane.PolledCommand, types.TunnelServiceRequestID, error)
Poll requests up to limit commands from the control plane.
func (*TunnelServiceClient) PostResponse ¶
func (c *TunnelServiceClient) PostResponse(ctx context.Context, requestID types.RequestID, response *types.TunnelResponse) (types.TunnelServiceRequestID, error)
PostResponse acknowledges the provided request with the JSON-RPC response.