host_repo

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: 7 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 {
	base_clients.ResourceClient[model.Host]
}

Client is the client for the host model. It is used to query the database for hosts, and extends model.ResourceClient.

func New

func New() *Client

New returns a new host client.

func (*Client) Activated

func (client *Client) Activated() *Client

Activated adds a filter to only return activated hosts

func (*Client) DeactivateHost

func (client *Client) DeactivateHost(name string, until ...time.Time) error

func (*Client) MarkSchedulable

func (client *Client) MarkSchedulable(name string, schedulable bool) error

func (*Client) Register

func (client *Client) Register(host *model.Host) error

func (*Client) Schedulable

func (client *Client) Schedulable() *Client

Schedulable adds a filter to only return hosts that are schedulable

func (*Client) WithPagination

func (client *Client) WithPagination(page, pageSize int) *Client

WithPagination sets the pagination for the client.

Jump to

Keyboard shortcuts

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