stats

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentStat

type AgentStat struct {
	ID           string        `json:"id"`
	Name         string        `json:"name"`
	Stats        []Stat        `json:"stats"`
	Environments []Environment `json:"environments"`
}

type AgentsStats

type AgentsStats struct {
	Agents []AgentStat `json:"agents"`
}

type Environment

type Environment struct {
	Id   string `json:"id"`
	Name string `json:"name"`

	Stats []Stat `json:"stats"`
}

type Stat

type Stat struct {
	Requests  int64  `json:"request"`
	Errors    int64  `json:"error"`
	Successes int64  `json:"success"`
	Label     string `json:"label"`
}

type System

type System struct {
	Config  *ConfigBuilder.Config
	Context context.Context
}

func NewSystem

func NewSystem(cfg *ConfigBuilder.Config) *System

func (*System) AddAgentError

func (s *System) AddAgentError(companyId, agentId, environmentId string)

func (*System) AddAgentSuccess

func (s *System) AddAgentSuccess(companyId, agentId, environmentId string)

func (*System) GetAgentEnvironmentStats

func (s *System) GetAgentEnvironmentStats(agentId string, timePeriod int) (*AgentStat, error)

func (*System) GetAgentName

func (s *System) GetAgentName(agentId string) (string, error)

func (*System) GetAgentStats

func (s *System) GetAgentStats(w http.ResponseWriter, r *http.Request)

func (*System) GetAgentsStats

func (s *System) GetAgentsStats(w http.ResponseWriter, r *http.Request)

func (*System) GetAgentsStatsFromInflux

func (s *System) GetAgentsStatsFromInflux(companyId string) (*AgentsStats, error)

func (*System) GetCompanyStats

func (s *System) GetCompanyStats(w http.ResponseWriter, r *http.Request)

func (*System) GetEnvironmentName

func (s *System) GetEnvironmentName(environmentId string) (string, error)

func (*System) GetEnvironmentStats

func (s *System) GetEnvironmentStats(w http.ResponseWriter, r *http.Request)

func (*System) GetNamesForData

func (s *System) GetNamesForData(data *AgentStat) (*AgentStat, error)

func (*System) GetProjectStats

func (s *System) GetProjectStats(w http.ResponseWriter, r *http.Request)

func (*System) SetContext

func (s *System) SetContext(ctx context.Context) *System

Jump to

Keyboard shortcuts

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