api

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 6 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 twins.Service, logger *slog.Logger) twins.Service

LoggingMiddleware adds logging facilities to the core service.

func MetricsMiddleware

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

MetricsMiddleware instruments core service by tracking request count and latency.

Types

This section is empty.

Directories

Path Synopsis
Package http contains implementation of kit service HTTP API.
Package http contains implementation of kit service HTTP API.

Jump to

Keyboard shortcuts

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