Documentation
¶
Index ¶
- type ExternalSchedulerHost
- type ExternalSchedulerRequest
- func (r ExternalSchedulerRequest) GetPipeline() string
- func (r ExternalSchedulerRequest) GetSubjects() []string
- func (r ExternalSchedulerRequest) GetTraceLogArgs() []slog.Attr
- func (r ExternalSchedulerRequest) GetWeights() map[string]float64
- func (r ExternalSchedulerRequest) WithPipeline(pipeline string) scheduler.PipelineRequest
- type ExternalSchedulerResponse
- type ManilaRequestContext
- type Pipeline
- type Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalSchedulerHost ¶
type ExternalSchedulerHost struct { string `json:"host"` }ShareHost
Host object from the Manila scheduler pipeline.
type ExternalSchedulerRequest ¶
type ExternalSchedulerRequest struct { // TODO: Use a more specific type for the spec. Spec any `json:"spec"` // Request context from Manila that contains additional meta information. Context ManilaRequestContext `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 Manila 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 Manila 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 Manila weigher pipeline. Some additional flags are also included.
func (ExternalSchedulerRequest) GetPipeline ¶
func (r ExternalSchedulerRequest) GetPipeline() string
func (ExternalSchedulerRequest) GetSubjects ¶
func (r ExternalSchedulerRequest) GetSubjects() []string
func (ExternalSchedulerRequest) GetTraceLogArgs ¶
func (r ExternalSchedulerRequest) GetTraceLogArgs() []slog.Attr
func (ExternalSchedulerRequest) GetWeights ¶
func (r ExternalSchedulerRequest) GetWeights() map[string]float64
func (ExternalSchedulerRequest) WithPipeline ¶
func (r ExternalSchedulerRequest) WithPipeline(pipeline string) scheduler.PipelineRequest
type ExternalSchedulerResponse ¶
type ExternalSchedulerResponse struct {
Hosts []string `json:"hosts"`
}
Response generated by cortex for the Manila scheduler. Cortex returns an ordered list of hosts that the share should be scheduled on.
type ManilaRequestContext ¶
type ManilaRequestContext 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"` }
Manila request context object. For the spec of this object, see:
- This: https://github.com/sapcc/manila/blob/4ffdfc/manila/context.py#L29 - And: https://github.com/openstack/oslo.context/blob/db20dd/oslo_context/context.py#L329
Some fields are omitted: "service_catalog", "read_deleted" (same as "show_deleted")
type Request ¶
type Request interface { // Specification of the scheduling request. GetSpec() any // Request context from Manila that contains additional meta information. GetContext() ManilaRequestContext // List of hosts to be considered for scheduling. // If the list is nil, all hosts are considered. GetHosts() []string // Map of weights to start with. // If the map is nil, all hosts will have the default weight starting. GetWeights() map[string]float64 }
Request to the Cortex scheduling pipeline.