telemetry

package
v0.0.0-...-d091464 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Telemetry

type Telemetry interface {
	// Start enables the metrics server.
	Start()
	// Stop terminates the metrics server.
	Stop() error
	// RecordGameStateUpdateDuration records the duration a game state update took to complete.
	RecordGameStateUpdateDuration(duration float64)
	// RecordPlayerConnected tracks a player that was connected to the server.
	RecordPlayerConnected()
	// RecordPlayerDisconnected tracks a player that was disconnected from the server.
	RecordPlayerDisconnected()
}

Telemetry is an interface for metrics providers that instrument the game server.

func Setup

func Setup(cfg *config.Config) (Telemetry, error)

Setup creates a new metrics provider. If the provider cannot be created, an error is returned. You must call Start() on the returned Telemetry provider to initialize it, and call Drop() to clean up resources.

Jump to

Keyboard shortcuts

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