resource

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0, BSD-3-Clause, MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {

	// SyncNodeResource receive event to update offline resource capacity timely
	SyncNodeResource(event *types.ResourceUpdateEvent) error
	// contains filtered or unexported methods
}

Interface is the manager used to update offline resource capacity

func NewMockResource

func NewMockResource() Interface

NewMockResource new a mock Resource manager

func NewOfflineOnK8sManager

func NewOfflineOnK8sManager(config types.NodeResourceConfig, predictor predict.Interface,
	conflict conflict.Manager, offlineData interface{}) Interface

NewOfflineOnK8sManager new an instance for node resource manager

type K8sMetadata

type K8sMetadata struct {
	PodName   string
	Namespace string
}

K8sMetadata describe meta data for k8s type

type MockResource

type MockResource struct {
	ReceivedEvent     bool
	ScheduledDisabled bool
}

MockResource mock Resource manager

func (*MockResource) Collect

func (m *MockResource) Collect(chan<- prometheus.Metric)

Collect mock function

func (*MockResource) Describe

func (m *MockResource) Describe(chan<- *prometheus.Desc)

Describe mock function

func (*MockResource) DisableOfflineSchedule

func (m *MockResource) DisableOfflineSchedule() error

DisableOfflineSchedule mock function

func (*MockResource) EnableOfflineSchedule

func (m *MockResource) EnableOfflineSchedule() error

EnableOfflineSchedule mock function

func (*MockResource) GetOfflineJobs

func (m *MockResource) GetOfflineJobs() ([]types.OfflineJobs, error)

GetOfflineJobs mock function

func (*MockResource) KillOfflineJob

func (m *MockResource) KillOfflineJob(conflictingResource v1.ResourceName)

KillOfflineJob mock function

func (*MockResource) Name

func (m *MockResource) Name() string

Name mock function

func (*MockResource) Run

func (m *MockResource) Run(stopCh <-chan struct{})

Run mock function

func (*MockResource) SyncNodeResource

func (m *MockResource) SyncNodeResource(event *types.ResourceUpdateEvent) error

SyncNodeResource mock function

type OfflineK8sData

type OfflineK8sData struct {
	OfflineOnK8sCommonData
	// node informer
	NodeInformer cache.SharedIndexInformer
}

OfflineK8sData describe options needed for k8s offline type

type OfflineOnK8sCommonData

type OfflineOnK8sCommonData struct {
	// container state
	StStore statestore.StateStore
	// k8s client
	Client kubernetes.Interface
	// pod informer
	PodInformer cache.SharedIndexInformer
	// checkpointManager
	CheckpointManager *checkpoint.NodeResourceCheckpointManager
}

OfflineOnK8sCommonData describe common data for offline jobs on k8s, including yarn on k8s

type OfflineYarnData

type OfflineYarnData struct {
	OfflineOnK8sCommonData
}

OfflineYarnData describes options needed for yarn type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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