model

package
v0.0.0-...-8ba21cc Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SelectorFromPB

func SelectorFromPB(req *enginepb.Selector) (*label.Selector, error)

SelectorFromPB converts a protobuf Selector message to the internal data type label.Selector. This function does the necessary sanity checks, so it's safe to use with an RPC argument.

func SelectorToPB

func SelectorToPB(sel *label.Selector) (*enginepb.Selector, error)

SelectorToPB converts a label.Selector to a protobuf message Selector.

Types

type ExecutorInfo

type ExecutorInfo struct {
	// ID is the executorID.
	ID model.ExecutorID
	// Labels stores the labels configured for the given executor.
	Labels label.Set
}

ExecutorInfo contains information about each executor maintained internally to the scheduler.

type SchedulerRequest

type SchedulerRequest struct {
	TenantID          string // reserved for future use.
	ExternalResources []resModel.ResourceKey
	Selectors         []*label.Selector
}

SchedulerRequest represents a request for an executor to run a given task.

func NewSchedulerRequestFromPB

func NewSchedulerRequestFromPB(req *enginepb.ScheduleTaskRequest) (*SchedulerRequest, error)

NewSchedulerRequestFromPB converts a protobuf message ScheduleTaskRequest to the internal data structure SchedulerRequest.

type SchedulerResponse

type SchedulerResponse struct {
	ExecutorID model.ExecutorID
}

SchedulerResponse represents a response to a task scheduling request.

Jump to

Keyboard shortcuts

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