scheduler

package
v0.4.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Disk

type Disk struct {
	types.DiskSpec
	NodeID string
}

type DiskSchedulingInfo

type DiskSchedulingInfo struct {
	StorageAvailable           int64
	StorageMaximum             int64
	StorageReserved            int64
	StorageScheduled           int64
	OverProvisioningPercentage int64
	MinimalAvailablePercentage int64
}

type ReplicaScheduler

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

func NewReplicaScheduler

func NewReplicaScheduler(ds *datastore.DataStore) *ReplicaScheduler

func (*ReplicaScheduler) GetDiskSchedulingInfo

func (rcs *ReplicaScheduler) GetDiskSchedulingInfo(disk types.DiskSpec, diskStatus types.DiskStatus) (*DiskSchedulingInfo, error)

func (*ReplicaScheduler) IsSchedulableToDisk

func (rcs *ReplicaScheduler) IsSchedulableToDisk(size int64, info *DiskSchedulingInfo) bool

func (*ReplicaScheduler) ScheduleReplica

func (rcs *ReplicaScheduler) ScheduleReplica(replica *longhorn.Replica, replicas map[string]*longhorn.Replica) (*longhorn.Replica, error)

ScheduleReplica will return (nil, nil) for unschedulable replica

Jump to

Keyboard shortcuts

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