diagnostics

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DurationMillis

func DurationMillis(duration time.Duration) int64

func Enabled

func Enabled(debugEnabled bool, httpAddr string) bool

func IsLoopbackBind

func IsLoopbackBind(addr string) bool

func RegisterRoutes

func RegisterRoutes(mux *http.ServeMux, svc *Service)

Types

type IngestionSnapshotter

type IngestionSnapshotter interface {
	IngestionDiagnostics() projectingestion.DiagnosticsSnapshot
}

type RuntimeOptions

type RuntimeOptions struct {
	Enabled bool
}

type RuntimeSnapshot

type RuntimeSnapshot struct {
	Goroutines      int    `json:"goroutines"`
	HeapAllocBytes  uint64 `json:"heap_alloc_bytes"`
	HeapInuseBytes  uint64 `json:"heap_inuse_bytes"`
	StackInuseBytes uint64 `json:"stack_inuse_bytes"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(ingestion IngestionSnapshotter, runtimeOptions RuntimeOptions) *Service

func (*Service) Snapshot

func (svc *Service) Snapshot() Snapshot

type Snapshot

type Snapshot struct {
	Ingestion projectingestion.DiagnosticsSnapshot `json:"ingestion"`
	Runtime   RuntimeSnapshot                      `json:"runtime,omitempty"`
}

Jump to

Keyboard shortcuts

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