cgroup

package
v1.38.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CgroupResource

type CgroupResource struct{}

CgroupResource represents Cgroup resource

func (*CgroupResource) ApplyTransition

func (c *CgroupResource) ApplyTransition(nextState resourcestatus.ResourceStatus) error

ApplyTransition calls the function required to move to the specified status

func (*CgroupResource) BuildContainerDependency added in v1.38.0

func (cgroup *CgroupResource) BuildContainerDependency(containerName string, satisfied apicontainerstatus.ContainerStatus,
	dependent resourcestatus.ResourceStatus)

func (*CgroupResource) Cleanup

func (c *CgroupResource) Cleanup() error

Cleanup removes the cgroup root created for the task

func (*CgroupResource) Create

func (c *CgroupResource) Create() error

Create creates cgroup root for the task

func (*CgroupResource) DependOnTaskNetwork added in v1.38.0

func (cgroup *CgroupResource) DependOnTaskNetwork() bool

func (*CgroupResource) DesiredTerminal

func (c *CgroupResource) DesiredTerminal() bool

DesiredTerminal returns true if the cgroup's desired status is REMOVED

func (*CgroupResource) GetAppliedStatus added in v1.38.0

func (c *CgroupResource) GetAppliedStatus() resourcestatus.ResourceStatus

GetAppliedStatus safely returns the currently applied status of the resource

func (*CgroupResource) GetContainerDependencies added in v1.38.0

func (cgroup *CgroupResource) GetContainerDependencies(dependent resourcestatus.ResourceStatus) []apicontainer.ContainerDependency

func (*CgroupResource) GetCreatedAt

func (c *CgroupResource) GetCreatedAt() time.Time

GetCreatedAt sets the timestamp for resource's creation time

func (*CgroupResource) GetDesiredStatus

func (c *CgroupResource) GetDesiredStatus() resourcestatus.ResourceStatus

GetDesiredStatus safely returns the desired status of the task

func (*CgroupResource) GetKnownStatus

func (c *CgroupResource) GetKnownStatus() resourcestatus.ResourceStatus

GetKnownStatus safely returns the currently known status of the task

func (*CgroupResource) GetName

func (c *CgroupResource) GetName() string

GetName safely returns the name of the resource

func (*CgroupResource) GetTerminalReason

func (c *CgroupResource) GetTerminalReason() string

func (*CgroupResource) Initialize

func (cgroup *CgroupResource) Initialize(resourceFields *taskresource.ResourceFields,
	taskKnownStatus status.TaskStatus,
	taskDesiredStatus status.TaskStatus)

Initialize fills the resource fileds

func (*CgroupResource) KnownCreated

func (c *CgroupResource) KnownCreated() bool

KnownCreated returns true if the cgroup's known status is CREATED

func (*CgroupResource) MarshalJSON

func (c *CgroupResource) MarshalJSON() ([]byte, error)

MarshalJSON marshals CgroupResource object

func (*CgroupResource) NextKnownState

func (c *CgroupResource) NextKnownState() resourcestatus.ResourceStatus

NextKnownState returns the state that the resource should progress to based on its `KnownState`.

func (*CgroupResource) SetAppliedStatus

func (c *CgroupResource) SetAppliedStatus(status resourcestatus.ResourceStatus) bool

SetAppliedStatus sets the applied status of resource and returns whether the resource is already in a transition

func (*CgroupResource) SetCreatedAt

func (c *CgroupResource) SetCreatedAt(createdAt time.Time)

SetCreatedAt sets the timestamp for resource's creation time

func (*CgroupResource) SetDesiredStatus

func (c *CgroupResource) SetDesiredStatus(status resourcestatus.ResourceStatus)

SetDesiredStatus safely sets the desired status of the resource

func (*CgroupResource) SetKnownStatus

func (c *CgroupResource) SetKnownStatus(status resourcestatus.ResourceStatus)

SetKnownStatus safely sets the currently known status of the resource

func (*CgroupResource) StatusString

func (c *CgroupResource) StatusString(status resourcestatus.ResourceStatus) string

StatusString returns the string of the cgroup resource status

func (*CgroupResource) SteadyState

func (c *CgroupResource) SteadyState() resourcestatus.ResourceStatus

SteadyState returns the transition state of the resource defined as "ready"

func (*CgroupResource) TerminalStatus

func (c *CgroupResource) TerminalStatus() resourcestatus.ResourceStatus

TerminalStatus returns the last transition state of cgroup

func (*CgroupResource) UnmarshalJSON

func (c *CgroupResource) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals CgroupResource object

Directories

Path Synopsis
factory/mock
Package mock_cgroups is a generated GoMock package.
Package mock_cgroups is a generated GoMock package.
factory/mock_factory
Package mock_factory is a generated GoMock package.
Package mock_factory is a generated GoMock package.
mock_control
Package mock_control is a generated GoMock package.
Package mock_control is a generated GoMock package.

Jump to

Keyboard shortcuts

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