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 ¶
- Variables
- func Lead(shutdown <-chan interface{}, conn coordclient.Connection, ...)
- func NewScheduler(poolID string, instance_id string, storageServer *storage.Server, ...) (*scheduler, error)
- func StrategySelectHost(sn *zkservice.ServiceNode, hosts []host.Host, strat strategy.Strategy, ...) (string, error)
- type StrategyHost
- type StrategyRunningService
- type StrategyService
Constants ¶
This section is empty.
Variables ¶
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
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 (s *StrategyRunningService) HostPolicy() servicedefinition.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 (s *StrategyService) HostPolicy() servicedefinition.HostPolicy
func (*StrategyService) RequestedCorePercent ¶
func (s *StrategyService) RequestedCorePercent() int
func (*StrategyService) RequestedMemoryBytes ¶
func (s *StrategyService) RequestedMemoryBytes() uint64