usage

package
v0.0.0-...-d4d4b81 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentStat

type AgentStat struct {
	Ns      int `bson:"ns"`
	Cluster int `bson:"cluster"`
	Total   int `bson:"total"`
	Active  int `bson:"active"`
}

type AggregateData

type AggregateData struct {
	Projects   []*ProjectData `bson:"projects"`
	Pagination []Pagination   `bson:"pagination"`
	TotalCount []TotalCount   `bson:"totalCount"`
}

type Pagination

type Pagination struct {
	TotalEntries int `bson:"totalEntries"`
}

type ProjectData

type ProjectData struct {
	Workflows *WorkflowStat `bson:"workflows"`
	Agents    *AgentStat    `bson:"agents"`
	ProjectID string        `bson:"_id"`
}

type Service

type Service interface {
	GetUsageData(ctx context.Context, query model.UsageDataRequest) (*model.UsageDataResponse, error)
}

func NewService

func NewService(clusterOperator *dbOperationsProject.Operator) Service

NewService returns a new instance of usage service

type TotalCount

type TotalCount struct {
	Projects  int           `bson:"projects"`
	Agents    *AgentStat    `bson:"agents"`
	Workflows *WorkflowStat `bson:"workflows"`
}

type WorkflowStat

type WorkflowStat struct {
	Schedules int `bson:"schedules"`
	Runs      int `bson:"runs"`
	ExpRuns   int `bson:"expRuns"`
}

Jump to

Keyboard shortcuts

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