task

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BMCCommandDonePayload

type BMCCommandDonePayload struct {
	Error *string `json:"error,omitempty"`
}

type Client

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

func NewClient

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

func (*Client) DeleteTask

func (c *Client) DeleteTask(queue, id string) error

func (*Client) GetQueues

func (c *Client) GetQueues() ([]string, error)

func (*Client) GetTaskInfo

func (c *Client) GetTaskInfo(queue, id string) (*asynq.TaskInfo, error)

func (*Client) List

func (c *Client) List(queue *string) ([]*asynq.TaskInfo, error)

func (*Client) NewTask

func (c *Client) NewTask(payload any, additionalOpts ...asynq.Option) (*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 MachineAllocationPayload

type MachineAllocationPayload struct {
	// UUID of the machine which was allocated and trigger the machine installation
	UUID string `json:"uuid,omitempty"`
}

type MachineBMCCommandPayload

type MachineBMCCommandPayload struct {
	// UUID of the machine where the command should be executed against
	UUID string `json:"uuid,omitempty"`
	// Partition where the machine resides
	Partition string `json:"partition,omitempty"`
	// The actual command
	Command string `json:"command,omitempty"`
	// CommandID identifies this command unique
	CommandID string `json:"command_id"`
}

type MachineDeletePayload

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"`
}

type TaskType

type TaskType string
const (
	TypeIpDelete          TaskType = "ip:delete"
	TypeNetworkDelete     TaskType = "network:delete"
	TypeMachineDelete     TaskType = "machine:delete"
	TypeMachineBMCCommand TaskType = "machine:bmc-command"
	TypeMachineAllocation TaskType = "machine:allocation"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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