client

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: GPL-3.0 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 {
	// contains filtered or unexported fields
}

Client is a Hivemind API client

func NewClient

func NewClient(baseURL string, options ...ClientOption) *Client

NewClient creates a new Hivemind API client

func (*Client) CreateContainer

func (c *Client) CreateContainer(container *api.Container) (*api.Container, error)

CreateContainer creates a new container

func (*Client) DeleteContainer

func (c *Client) DeleteContainer(id string) error

DeleteContainer deletes a container by ID

func (*Client) GetContainer

func (c *Client) GetContainer(id string) (*api.Container, error)

GetContainer returns a container by ID

func (*Client) GetNode

func (c *Client) GetNode(id string) (*api.Node, error)

GetNode returns a node by ID

func (*Client) ListContainers

func (c *Client) ListContainers() ([]api.Container, error)

ListContainers returns a list of containers

func (*Client) ListNodes

func (c *Client) ListNodes() ([]api.Node, error)

ListNodes returns a list of nodes

type ClientOption

type ClientOption func(*Client)

ClientOption is a function that configures a Client

func WithTimeout

func WithTimeout(timeout time.Duration) ClientOption

WithTimeout sets the timeout for the HTTP client

func WithToken

func WithToken(token string) ClientOption

WithToken sets the authentication token

Jump to

Keyboard shortcuts

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