general

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddPod = iota
	UpdatePod
	DeletePod
)
View Source
const (
	Recovery = iota
	Informers
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EventSource added in v1.1.0

type EventSource int

type EventType added in v1.1.0

type EventType int

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager implements interfaces#Recoverable, interfaces#AppManager generic app management service watches events from all the pods, it recognize apps by reading pod's spec labels, if there are proper info such as applicationID, queue name found, and claim it as an app or a app task, then report them to scheduler cache by calling am protocol

func NewManager

func NewManager(apiProvider client.APIProvider, podEventHandler *PodEventHandler) *Manager

func (*Manager) AddPod added in v1.1.0

func (os *Manager) AddPod(obj interface{})

AddPod Add application and task using pod metadata Visibility: Public only for testing

func (*Manager) GetExistingAllocation

func (os *Manager) GetExistingAllocation(pod *v1.Pod) *si.Allocation

func (*Manager) ListPods added in v1.1.0

func (os *Manager) ListPods() ([]*v1.Pod, error)

func (*Manager) Name

func (os *Manager) Name() string

this implements AppManagementService interface

func (*Manager) ServiceInit

func (os *Manager) ServiceInit() error

this implements AppManagementService interface

func (*Manager) Start

func (os *Manager) Start() error

this implements AppManagementService interface

func (*Manager) Stop

func (os *Manager) Stop()

this implements AppManagementService interface

type PodEventHandler added in v1.1.0

type PodEventHandler struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewPodEventHandler added in v1.1.0

func NewPodEventHandler(amProtocol interfaces.ApplicationManagementProtocol, recoveryRunning bool) *PodEventHandler

func (*PodEventHandler) HandleEvent added in v1.1.0

func (p *PodEventHandler) HandleEvent(eventType EventType, source EventSource, pod *v1.Pod) interfaces.ManagedApp

func (*PodEventHandler) RecoveryDone added in v1.1.0

func (p *PodEventHandler) RecoveryDone()

Jump to

Keyboard shortcuts

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