scheduler

package
v0.0.0-...-1c5d739 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 22 Imported by: 2

Documentation

Overview

Copyright 2014 The Serviced Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoAuthenticatedHosts = errors.New("no authenticated hosts found")
)

Functions

func Lead

func Lead(shutdown <-chan interface{}, conn coordclient.Connection, cpClient dao.ControlPlane, facade *facade.Facade, poolID string)

Lead is executed by the "leader" of the control center cluster to handle its management responsibilities of:

services
snapshots
virtual IPs

func NewScheduler

func NewScheduler(poolID string, instance_id string, storageServer *storage.Server, cpDao dao.ControlPlane, facade *facade.Facade, pushreg *imgreg.RegistryListener, snapshotTTL int) (*scheduler, error)

NewScheduler creates a new scheduler master

func StrategySelectHost

func StrategySelectHost(sn *zkservice.ServiceNode, hosts []host.Host, strat strategy.Strategy, facade *facade.Facade) (string, error)

Types

type StrategyHost

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

func (*StrategyHost) HostID

func (h *StrategyHost) HostID() string

func (*StrategyHost) RunningServices

func (h *StrategyHost) RunningServices() []strategy.ServiceConfig

func (*StrategyHost) TotalCores

func (h *StrategyHost) TotalCores() int

func (*StrategyHost) TotalMemory

func (h *StrategyHost) TotalMemory() uint64

type StrategyRunningService

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

func (*StrategyRunningService) GetServiceID

func (s *StrategyRunningService) GetServiceID() string

func (*StrategyRunningService) HostPolicy

func (*StrategyRunningService) RequestedCorePercent

func (s *StrategyRunningService) RequestedCorePercent() int

func (*StrategyRunningService) RequestedMemoryBytes

func (s *StrategyRunningService) RequestedMemoryBytes() uint64

type StrategyService

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

func (*StrategyService) GetServiceID

func (s *StrategyService) GetServiceID() string

func (*StrategyService) HostPolicy

func (*StrategyService) RequestedCorePercent

func (s *StrategyService) RequestedCorePercent() int

func (*StrategyService) RequestedMemoryBytes

func (s *StrategyService) RequestedMemoryBytes() uint64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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