cgroups

package
v14.5.4 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CGroupV1Manager

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

CGroupV1Manager is the manager for cgroups v1

func (*CGroupV1Manager) AddCommand

func (cg *CGroupV1Manager) AddCommand(cmd *command.Command) error

nolint: revive,stylecheck // This is unintentionally missing documentation.

func (*CGroupV1Manager) Cleanup

func (cg *CGroupV1Manager) Cleanup() error

nolint: revive,stylecheck // This is unintentionally missing documentation.

func (*CGroupV1Manager) Setup

func (cg *CGroupV1Manager) Setup() error

nolint: revive,stylecheck // This is unintentionally missing documentation.

type Manager

type Manager interface {
	// Setup creates cgroups and assigns configured limitations.
	// It is expected to be called once at Gitaly startup from any
	// instance of the Manager.
	Setup() error
	// AddCommand adds a Command to a cgroup
	AddCommand(*command.Command) error
	// Cleanup cleans up cgroups created in Setup.
	// It is expected to be called once at Gitaly shutdown from any
	// instance of the Manager.
	Cleanup() error
}

Manager supplies an interface for interacting with cgroups

func NewManager

func NewManager(cfg cgroups.Config) Manager

NewManager returns the appropriate Cgroups manager

type NoopManager

type NoopManager struct{}

NoopManager is a cgroups manager that does nothing

func (*NoopManager) AddCommand

func (cg *NoopManager) AddCommand(cmd *command.Command) error

nolint: revive,stylecheck // This is unintentionally missing documentation.

func (*NoopManager) Cleanup

func (cg *NoopManager) Cleanup() error

nolint: revive,stylecheck // This is unintentionally missing documentation.

func (*NoopManager) Setup

func (cg *NoopManager) Setup() error

nolint: revive,stylecheck // This is unintentionally missing documentation.

Jump to

Keyboard shortcuts

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