apiserver

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	DB        *mysql.DB
	Resource  *service.Resource
	Cluster   *service.Cluster
	Artifacts *service.Artifacts
	sync.Mutex
}

Manager ...

func New

func New(dsn string) (*Manager, error)

New creates a manager instance

func (*Manager) PollCleaningPendingClusterRequests

func (m *Manager) PollCleaningPendingClusterRequests(ctx context.Context)

PollCleaningPendingClusterRequests polls pending rebuild request

func (*Manager) PollPendingClusterRequests

func (m *Manager) PollPendingClusterRequests(ctx context.Context)

PollPendingClusterRequests polls pending cluster requests, bind them to resource requests which are idle.

func (*Manager) PollPendingResourceRequests

func (m *Manager) PollPendingResourceRequests(ctx context.Context)

PollPendingResourceRequests polls pending resource requests and match them with all idle resources. When manager finds that one resource request have enough idle matching resources, it binds these resources to this resource request, change this resource request to `READY` state so that resource request can be scheduled to the cluster request that have bound to it, and then mark this cluster request to `READY` state.

func (*Manager) PollReadyClusterRequests

func (m *Manager) PollReadyClusterRequests(ctx context.Context)

PollReadyClusterRequests polls ready cluster request and schedules workload of it

func (*Manager) Run

func (m *Manager) Run() (err error)

Run ...

Jump to

Keyboard shortcuts

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