Documentation ¶
Index ¶
- type CGroupV1Manager
- func (cg *CGroupV1Manager) AddCommand(cmd *command.Command, repo repository.GitRepo) (string, error)
- func (cg *CGroupV1Manager) Cleanup() error
- func (cg *CGroupV1Manager) Collect(ch chan<- prometheus.Metric)
- func (cg *CGroupV1Manager) Describe(ch chan<- *prometheus.Desc)
- func (cg *CGroupV1Manager) Setup() error
- type Manager
- type NoopManager
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, repo repository.GitRepo, ) (string, error)
AddCommand adds the given command to one of the CGroup's buckets. The bucket used for the command is determined by hashing the repository storage and path. No error is returned if the command has already exited.
func (*CGroupV1Manager) Cleanup ¶
func (cg *CGroupV1Manager) Cleanup() error
nolint: revive,stylecheck // This is unintentionally missing documentation.
func (*CGroupV1Manager) Collect ¶
func (cg *CGroupV1Manager) Collect(ch chan<- prometheus.Metric)
Collect collects metrics from the cgroups controller
func (*CGroupV1Manager) Describe ¶
func (cg *CGroupV1Manager) Describe(ch chan<- *prometheus.Desc)
Describe describes the cgroup metrics that Collect provides
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, repository.GitRepo) (string, 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 Describe(ch chan<- *prometheus.Desc) Collect(ch chan<- prometheus.Metric) }
Manager supplies an interface for interacting with cgroups
func NewManager ¶
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, repo repository.GitRepo) (string, 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) Collect ¶
func (cg *NoopManager) Collect(ch chan<- prometheus.Metric)
Collect does nothing
func (*NoopManager) Describe ¶
func (cg *NoopManager) Describe(ch chan<- *prometheus.Desc)
Describe does nothing
func (*NoopManager) Setup ¶
func (cg *NoopManager) Setup() error
nolint: revive,stylecheck // This is unintentionally missing documentation.