...

Package crio

import "github.com/chaos-mesh/chaos-mesh/pkg/chaosdaemon/crclients/crio"
Overview
Index

Overview ▾

Constants

const (
    InspectContainersEndpoint = "/containers"
)

type CrioClient

CrioClient can get information from docker

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

func New

func New(socketPath string) (*CrioClient, error)

func (CrioClient) ContainerKillByContainerID

func (c CrioClient) ContainerKillByContainerID(ctx context.Context, containerID string) error

ContainerKillByContainerID kills container according to container id

func (CrioClient) FormatContainerID

func (c CrioClient) FormatContainerID(ctx context.Context, containerID string) (string, error)

FormatContainerID strips protocol prefix from the container ID

func (CrioClient) GetLabelsFromContainerID

func (c CrioClient) GetLabelsFromContainerID(ctx context.Context, containerID string) (map[string]string, error)

GetLabelsFromContainerID returns the labels according to container ID

func (CrioClient) GetPidFromContainerID

func (c CrioClient) GetPidFromContainerID(ctx context.Context, containerID string) (uint32, error)

GetPidFromContainerID fetches PID according to container id

func (CrioClient) ListContainerIDs

func (c CrioClient) ListContainerIDs(ctx context.Context) ([]string, error)

ListContainerIDs lists all container IDs