service

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactLocator

type ArtifactLocator interface {
	Resolve() (string, error)
	WatchPaths() []string
}

type Clock

type Clock interface {
	Now() time.Time
}

type HistoryStore

type HistoryStore interface {
	Save(report.Report) error
}

type Metrics

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

type Service

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

func New

func New(cfg config.ServeConfig, analysisCfg config.AnalysisConfig) (*Service, error)

func (*Service) CurrentReport

func (s *Service) CurrentReport() *report.Report

func (*Service) CurrentStatus

func (s *Service) CurrentStatus() Status

func (*Service) Handler

func (s *Service) Handler() http.Handler

func (*Service) History

func (s *Service) History() []report.Report

func (*Service) Run

func (s *Service) Run(ctx context.Context) error

type Status

type Status struct {
	Ready         bool                  `json:"ready"`
	LastError     string                `json:"last_error,omitempty"`
	HistorySize   int                   `json:"history_size"`
	GeneratedAt   string                `json:"generated_at,omitempty"`
	Decision      string                `json:"decision,omitempty"`
	InputArtifact *report.InputArtifact `json:"input_artifact,omitempty"`
	Summary       report.Summary        `json:"summary"`
	Profiles      []StatusProfile       `json:"profiles,omitempty"`
}

type StatusProfile

type StatusProfile struct {
	Name                    string  `json:"name"`
	Decision                string  `json:"decision"`
	WeightedAggregate       float64 `json:"weighted_aggregate"`
	UnweightedAggregate     float64 `json:"unweighted_aggregate"`
	EndpointsBelowThreshold int     `json:"endpoints_below_threshold"`
}

Jump to

Keyboard shortcuts

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