crio

package
v0.49.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: Apache-2.0 Imports: 23 Imported by: 52

Documentation

Overview

Handler for CRI-O containers.

Index

Constants

View Source
const CrioNamespace = "crio"

The namespace under which crio aliases are unique.

View Source
const CrioNamespaceSuffix = ".scope"

The namespace suffix under which crio aliases are unique.

View Source
const (
	CrioSocket = "/var/run/crio/crio.sock"
)
View Source
const SystemdNamespace = "system-systemd"

The namespace systemd runs components under.

Variables

This section is empty.

Functions

func ContainerNameToCrioId

func ContainerNameToCrioId(name string) string

Returns the CRIO ID from the full container name.

func NewPlugin added in v0.34.0

func NewPlugin() container.Plugin

NewPlugin returns an implementation of container.Plugin suitable for passing to container.RegisterPlugin()

func Register

func Register(factory info.MachineInfoFactory, fsInfo fs.FsInfo, includedMetrics container.MetricSet) error

Register root container before running this function!

Types

type ContainerInfo

type ContainerInfo struct {
	Name        string            `json:"name"`
	Pid         int               `json:"pid"`
	Image       string            `json:"image"`
	CreatedTime int64             `json:"created_time"`
	Labels      map[string]string `json:"labels"`
	Annotations map[string]string `json:"annotations"`
	LogPath     string            `json:"log_path"`
	Root        string            `json:"root"`
	IP          string            `json:"ip_address"`
	IPs         []string          `json:"ip_addresses"`
}

ContainerInfo represents a given container information

type CrioClient added in v0.37.0

type CrioClient interface {
	Info() (Info, error)
	ContainerInfo(string) (*ContainerInfo, error)
}

func Client

func Client() (CrioClient, error)

Client returns a new configured CRI-O client

type Info

type Info struct {
	StorageDriver string `json:"storage_driver"`
	StorageRoot   string `json:"storage_root"`
	StorageImage  string `json:"storage_image"`
}

Info represents CRI-O information as sent by the CRI-O server

Directories

Path Synopsis
The install package registers crio.NewPlugin() as the "crio" container provider when imported
The install package registers crio.NewPlugin() as the "crio" container provider when imported

Jump to

Keyboard shortcuts

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