Help us shape the future of Go! Take the 2026 Go Developer Survey

tasks

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TaskCollectAll is a meta task, which enqueues all relevant OpenStack
	// tasks.
	TaskCollectAll = "openstack:task:collect-all"

	// TaskLinkAll is a task, which creates links between the OpenStack
	// models.
	TaskLinkAll = "openstack:task:link-all"
)
View Source
const (
	// TaskCollectFloatingIPs is the name of the task for collecting OpenStack
	// Floating IPs.
	TaskCollectFloatingIPs = "openstack:task:collect-floating-ips"
)
View Source
const (
	// TaskCollectLoadBalancers is the name of the task for collecting OpenStack
	// LoadBalancers.
	TaskCollectLoadBalancers = "openstack:task:collect-loadbalancers"
)
View Source
const (
	// TaskCollectNetworks is the name of the task for collecting OpenStack
	// Networks.
	TaskCollectNetworks = "openstack:task:collect-networks"
)
View Source
const (
	// TaskCollectServers is the name of the task for collecting OpenStack
	// servers.
	TaskCollectServers = "openstack:task:collect-servers"
)
View Source
const (
	// TaskCollectSubnets is the name of the task for collecting OpenStack
	// Subnets.
	TaskCollectSubnets = "openstack:task:collect-subnets"
)

Variables

View Source
var ErrClientNotFound = errors.New("client not found")

ErrClientNotFound is an error which is returned when an OpenStack client was not found in the clientset registries.

View Source
var ErrNoProjectID = errors.New("no project ID specified")

ErrNoProjectID is an error which is returned when an project id was not specified in a task payload.

Functions

func ClientNotFound

func ClientNotFound(name string) error

ClientNotFound wraps ErrClientNotFound with the given name.

func HandleCollectAllTask

func HandleCollectAllTask(ctx context.Context, t *asynq.Task) error

HandleCollectAllTask is a handler, which enqueues tasks for collecting all OpenStack objects.

func HandleCollectFloatingIPsTask

func HandleCollectFloatingIPsTask(ctx context.Context, t *asynq.Task) error

HandleCollectFloatingIPsTask handles the task for collecting OpenStack FloatingIPs.

func HandleCollectLoadBalancersTask

func HandleCollectLoadBalancersTask(ctx context.Context, t *asynq.Task) error

HandleCollectLoadBalancersTask handles the task for collecting OpenStack LoadBalancers.

func HandleCollectNetworksTask

func HandleCollectNetworksTask(ctx context.Context, t *asynq.Task) error

HandleCollectNetworksTask handles the task for collecting OpenStack Networks.

func HandleCollectServersTask

func HandleCollectServersTask(ctx context.Context, t *asynq.Task) error

HandleCollectServersTask handles the task for collecting OpenStack Servers.

func HandleCollectSubnetsTask

func HandleCollectSubnetsTask(ctx context.Context, t *asynq.Task) error

HandleCollectSubnetsTask handles the task for collecting OpenStack Subnets.

func HandleLinkAllTask

func HandleLinkAllTask(ctx context.Context, t *asynq.Task) error

HandleLinkAllTask is a handler, which establishes links between the various OpenStack models.

func LinkLoadBalancersWithSubnets

func LinkLoadBalancersWithSubnets(ctx context.Context, db *bun.DB) error

LinkLoadBalancersWithSubnets creates links between the OpenStack LoadBalancers and Subnets

func LinkSubnetsWithNetworks

func LinkSubnetsWithNetworks(ctx context.Context, db *bun.DB) error

LinkSubnetsWithNetworks creates links between the OpenStack Subnets and Networks

func NewCollectFloatingIPsTask

func NewCollectFloatingIPsTask() *asynq.Task

NewCollectFloatingIPsTask creates a new asynq.Task for collecting OpenStack FloatingIPs, without specifying a payload.

func NewCollectLoadBalancersTask

func NewCollectLoadBalancersTask() *asynq.Task

NewCollectLoadBalancersTask creates a new asynq.Task for collecting OpenStack LoadBalancers, without specifying a payload.

func NewCollectNetworksTask

func NewCollectNetworksTask() *asynq.Task

NewCollectNetworksTask creates a new asynq.Task for collecting OpenStack Networks, without specifying a payload.

func NewCollectServersTask

func NewCollectServersTask() *asynq.Task

NewCollectServersTask creates a new asynq.Task for collecting OpenStack servers, without specifying a payload.

func NewCollectSubnetsTask

func NewCollectSubnetsTask() *asynq.Task

NewCollectSubnetsTask creates a new asynq.Task for collecting OpenStack Subnets, without specifying a payload.

Types

type CollectFloatingIPsPayload

type CollectFloatingIPsPayload struct {
	// Project specifies the project from which to collect.
	ProjectID string `json:"project_id" yaml:"project_id"`
}

CollectFloatingIPsPayload represents the payload, which specifies from which project to collect OpenStack Floating IPs.

type CollectLoadBalancersPayload

type CollectLoadBalancersPayload struct {
	// Project specifies the project from which to collect.
	ProjectID string `json:"project_id" yaml:"project_id"`
}

CollectLoadBalancersPayload represents the payload, which specifies where to collect OpenStack LoadBalancers from.

type CollectNetworksPayload

type CollectNetworksPayload struct {
	// Project specifies the project from which to collect.
	ProjectID string `json:"project_id" yaml:"project_id"`
}

CollectNetworksPayload represents the payload, which specifies where to collect OpenStack Networks from.

type CollectServersPayload

type CollectServersPayload struct {
	// Project specifies the project from which to collect.
	ProjectID string `json:"project_id" yaml:"project_id"`
}

CollectServersPayload represents the payload, which specifies where to collect OpenStack Servers from.

type CollectSubnetsPayload

type CollectSubnetsPayload struct {
	// Project specifies the project from which to collect.
	ProjectID string `json:"project_id" yaml:"project_id"`
}

CollectSubnetsPayload represents the payload, which specifies where to collect OpenStack Subnets from.

Jump to

Keyboard shortcuts

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