system

package
v0.0.0-...-e71a76f Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// V2 is a reference to the parent client.
	V2 clients.V2

	// Cache is used to cache the resources fetched inside the service.
	Cache *core.Cache
}

func New

func New(v2 clients.V2, cache ...*core.Cache) *Client

New creates a new system service client.

func (*Client) GetZone

func (c *Client) GetZone(name string) *configModels.Zone

GetZone gets a zone by name and type

func (*Client) ListAllHosts

func (c *Client) ListAllHosts() ([]model.Host, error)

ListAllHosts gets a list of all hosts

func (*Client) ListCapacities

func (c *Client) ListCapacities(n int) ([]body.TimestampedSystemCapacities, error)

ListCapacities fetches the system capacities from the database.

func (*Client) ListHosts

func (c *Client) ListHosts() ([]model.Host, error)

ListHosts gets a list of hosts

func (*Client) ListStats

func (c *Client) ListStats(n int) ([]body.TimestampedSystemStats, error)

ListStats fetches the system stats from the database.

func (*Client) ListStatus

func (c *Client) ListStatus(n int) ([]body.TimestampedSystemStatus, error)

ListStatus fetches the system status from the database.

func (*Client) ListWorkerStatus

func (c *Client) ListWorkerStatus(opts ...opts.ListWorkerStatusOpts) ([]model.WorkerStatus, error)

ListWorkerStatus returns the status of all workers

func (*Client) ListZones

func (c *Client) ListZones(opts ...opts.ListOpts) ([]configModels.Zone, error)

ListZones gets a list of zones

func (*Client) RegisterNode

func (c *Client) RegisterNode(params *body.HostRegisterParams) error

func (*Client) ZoneHasCapability

func (c *Client) ZoneHasCapability(zoneName, capability string) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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