client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeIpDelete      = "ip:delete"
	TypeNetworkDelete = "network:delete"
	TypeMachineDelete = "machine:delete"
)

A list of task types.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(log *slog.Logger, redis *redis.Client, opts ...asynq.Option) *Client

func (*Client) NewIPDeleteTask

func (c *Client) NewIPDeleteTask(allocationUUID, ip, project string) (*asynq.TaskInfo, error)

func (*Client) NewMachineDeleteTask added in v0.0.6

func (c *Client) NewMachineDeleteTask(uuid, allocationUUID *string) (*asynq.TaskInfo, error)

func (*Client) NewNetworkDeleteTask

func (c *Client) NewNetworkDeleteTask(uuid string) (*asynq.TaskInfo, error)

type IPDeletePayload

type IPDeletePayload struct {
	AllocationUUID string `json:"allocation_uuid,omitempty"`
	IP             string `json:"ip,omitempty"`
	Project        string `json:"project,omitempty"`
}

type MachineDeletePayload added in v0.0.6

type MachineDeletePayload struct {
	// UUID of the machine which should be deleted (the machine)
	UUID *string `json:"uuid,omitempty"`
	// AllocationUUID of the machine allocation which should be deleted
	AllocationUUID *string `json:"allocation_uuid,omitempty"`
}

type NetworkDeletePayload

type NetworkDeletePayload struct {
	UUID string `json:"uuid,omitempty"`
}

Jump to

Keyboard shortcuts

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