reststats

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StatsServiceName rest.ServiceName = "stats"

StatsServiceName defines the service name for the Stats service.

Functions

func RegisterGetDatabaseStatsHandler

func RegisterGetDatabaseStatsHandler(n *Namespace) error

RegisterGetDatabaseStatsHandler registers the endpoint to retrieve database statistics

Types

type Namespace

type Namespace struct {
	*rest.Server
	// contains filtered or unexported fields
}

Namespace represents a service namespace containing configuration and dependencies for the Stats service.

func NewNamespace

func NewNamespace(server *rest.Server, db db.Adapter, pool *clients.ClientPool, nats *nats.Conn, cache *cache.Redis) *Namespace

NewNamespace creates a new instance of Namespace with the provided server, database adapter, client pool, NATS connection, and Redis cache.

func (*Namespace) GetName

func (s *Namespace) GetName() rest.ServiceName

GetName returns the service name for the Stats namespace.

func (*Namespace) RegisterHandlers

func (s *Namespace) RegisterHandlers() error

RegisterHandlers registers all the necessary handlers for the Stats namespace.

Jump to

Keyboard shortcuts

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