info

package
v0.5.11 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "info"

Variables

This section is empty.

Functions

func NewComponent

func NewComponent(_ context.Context, apiServer *echo.Echo, config *config.File, databaseClient database.Client, redisClient rueidis.Client) component.Component

Types

type Component

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

func (*Component) CollectMetric

func (c *Component) CollectMetric(ctx context.Context, value string)

func (*Component) GetActivityCount added in v0.5.1

func (c *Component) GetActivityCount(ctx echo.Context) error

GetActivityCount returns the total number of activities indexed by this Node.

func (*Component) GetNodeOperator added in v0.5.1

func (c *Component) GetNodeOperator(ctx echo.Context) error

GetNodeOperator returns the node information.

func (*Component) GetVersion added in v0.5.8

func (c *Component) GetVersion(ctx echo.Context) error

GetVersion returns the version of the network component.

func (*Component) GetWorkersStatus added in v0.5.1

func (c *Component) GetWorkersStatus(ctx echo.Context) error

GetWorkersStatus returns the status of all workers.

func (*Component) InitMeter

func (c *Component) InitMeter() (err error)

func (*Component) Name

func (c *Component) Name() string

type StatisticResponse added in v0.5.1

type StatisticResponse struct {
	Count      int64      `json:"count"`
	LastUpdate *time.Time `json:"last_update,omitempty"`
}

type Version added in v0.5.8

type Version struct {
	Tag    string `json:"tag"`
	Commit string `json:"commit"`
}

type VersionResponse added in v0.5.8

type VersionResponse struct {
	Data Version `json:"data"`
}

type WorkerInfo added in v0.5.1

type WorkerInfo struct {
	Network  network.Network `json:"network"`
	Worker   worker.Worker   `json:"worker"`
	Tags     []tag.Tag       `json:"tags"`
	Platform worker.Platform `json:"platform"`
	Status   worker.Status   `json:"status"`
}

type WorkerKey added in v0.5.1

type WorkerKey struct {
	Network network.Network
	Worker  worker.Worker
}

WorkerKey is the key for the worker status aggregator.

type WorkerResponse added in v0.5.1

type WorkerResponse struct {
	Data []*WorkerInfo `json:"data"`
}

type WorkerStatusAggregator added in v0.5.1

type WorkerStatusAggregator struct {
	Statuses []worker.Status
}

WorkerStatusAggregator aggregates the statuses of workers with the same Network+Worker.

Jump to

Keyboard shortcuts

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