resource

package
v0.0.0-...-1806480 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnableSupport = errors.New("Unable to support the request resource")
)

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager() *Manager

NewManager creates a new resource manager with default resource.

func (*Manager) ApplyResource

func (resm *Manager) ApplyResource(event *api.Event) error

ApplyResource uses to apply resource for container.

func (*Manager) GetCpucontainer

func (resm *Manager) GetCpucontainer() float64

GetCpucontainer func that get the default cpu for container.

func (*Manager) GetCpuuser

func (resm *Manager) GetCpuuser() float64

GetCpuuser func that get the default cpu for user.

func (*Manager) GetMemorycontainer

func (resm *Manager) GetMemorycontainer() float64

GetMemorycontainer func that get the default memory for container.

func (*Manager) GetMemoryuser

func (resm *Manager) GetMemoryuser() float64

GetMemoryuser func that get the default memory for user.

func (*Manager) ReleaseResource

func (resm *Manager) ReleaseResource(event *api.Event) error

ReleaseResource uses to add resource into db.

Jump to

Keyboard shortcuts

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