anomalyapi

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const TenantHeader = "X-Scope-OrgID"

Variables

View Source
var ErrTooManyServices = errors.New("too many services for a single anomaly query")

Functions

This section is empty.

Types

type Anomaly

type Anomaly struct {
	ProfileUUID string
	Score       float64
	ObservedAt  time.Time
	ModelID     string
}

type Client

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

func New

func New(cfg Config, httpClient *http.Client) *Client

New returns nil if cfg.URL is empty; callers must treat a nil Client as "unconfigured".

func (*Client) ListAnomalies

func (c *Client) ListAnomalies(ctx context.Context, tenantID string, serviceNames []string, start, end time.Time) ([]Anomaly, error)

ListAnomalies returns anomalies recorded for tenantID/serviceNames, observed within [start, end].

type Config

type Config struct {
	URL string `yaml:"url" category:"experimental"`
}

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

Jump to

Keyboard shortcuts

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