api

package
v0.0.0-...-2bfc6f9 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: Apache-2.0 Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CinderRequestContext

type CinderRequestContext struct {
	UserID          string   `json:"user"`
	ProjectID       string   `json:"project_id"`
	SystemScope     string   `json:"system_scope"`
	DomainID        string   `json:"domain"`
	UserDomainID    string   `json:"user_domain"`
	ProjectDomainID string   `json:"project_domain"`
	IsAdmin         bool     `json:"is_admin"`
	ReadOnly        bool     `json:"read_only"`
	ShowDeleted     bool     `json:"show_deleted"`
	RequestID       string   `json:"request_id"`
	GlobalRequestID string   `json:"global_request_id"`
	ResourceUUID    string   `json:"resource_uuid"`
	Roles           []string `json:"roles"`
	UserIdentity    string   `json:"user_identity"`
	IsAdminProject  bool     `json:"is_admin_project"`

	RemoteAddress string  `json:"remote_address"`
	Timestamp     string  `json:"timestamp"`
	QuotaClass    *string `json:"quota_class"`
	ProjectName   string  `json:"project_name"`
}

TODO add specs

type ExternalSchedulerHost

type ExternalSchedulerHost struct {
	// Name of the Cinder share host.
	VolumeHost string `json:"host"`
}

Host object from the Cinder scheduler pipeline.

type ExternalSchedulerRequest

type ExternalSchedulerRequest struct {
	// TODO: Use a more specific type for the spec.
	Spec any `json:"spec"`
	// Request context from Cinder that contains additional meta information.
	Context CinderRequestContext `json:"context"`
	// The share hosts that are available for scheduling.
	Hosts []ExternalSchedulerHost `json:"hosts"`
	// Weights map of share hosts to their weights calculated by the Cinder weigher pipeline.
	Weights map[string]float64 `json:"weights"`
	// The name of the pipeline to execute.
	// By default the required pipeline with the name "default" will be used.
	Pipeline string `json:"pipeline"`
}

Request generated by the Cinder scheduler when calling cortex. The request contains a spec of the share to be scheduled, a list of hosts and their status, and a map of weights that were calculated by the Cinder weigher pipeline. Some additional flags are also included.

type ExternalSchedulerResponse

type ExternalSchedulerResponse struct {
	Hosts []string `json:"hosts"`
}

Response generated by cortex for the Cinder scheduler. Cortex returns an ordered list of hosts that the share should be scheduled on.

Jump to

Keyboard shortcuts

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