server

package
v0.0.0-...-43a96cf Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server implementation for stats

func New

func New(es *relaxting.ES2Backend, pg *pgdb.DB) *Server

New creates a new server

func (*Server) GetNodesUsageCount

GetNodesUsageCount returns the count of unique nodes with lastRun in a given time.

func (*Server) ReadFailures

func (srv *Server) ReadFailures(ctx context.Context, in *stats.Query) (*stats.Failures, error)

ReadFailures returns failures by platform, environment, etc

func (*Server) ReadProfiles

func (srv *Server) ReadProfiles(ctx context.Context, in *stats.Query) (*stats.Profile, error)

ReadProfiles returns profile stats information (generalized and per profile-id)

func (*Server) ReadSummary

func (srv *Server) ReadSummary(ctx context.Context, in *stats.Query) (*stats.Summary, error)

ReadSummary returns summary, nodes-summary, or controls-summary information

func (*Server) ReadTrend

func (srv *Server) ReadTrend(ctx context.Context, in *stats.Query) (*stats.Trends, error)

ReadTrend returns trend information for nodes or controls

func (*Server) UpdateTelemetryReported

UpdateTelemetryReported Updates the last compliance telemetry reported date in postgres after the telemetry data is sent

Jump to

Keyboard shortcuts

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