api

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggingMiddleware

func LoggingMiddleware(svc ws.Service, logger *slog.Logger) ws.Service

LoggingMiddleware adds logging facilities to the websocket service.

func MakeHandler

func MakeHandler(ctx context.Context, svc ws.Service, l *slog.Logger, instanceID string) http.Handler

MakeHandler returns http handler with handshake endpoint.

func MetricsMiddleware

func MetricsMiddleware(svc ws.Service, counter metrics.Counter, latency metrics.Histogram) ws.Service

MetricsMiddleware instruments adapter by tracking request count and latency.

Types

This section is empty.

Jump to

Keyboard shortcuts

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