cri_apis

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Env variable key for CRI endpoint
	POSTMAN_INSIGHTS_CRI_ENDPOINT = "POSTMAN_INSIGHTS_CRI_ENDPOINT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Envs []*KeyValue `json:"envs"`
}

type ContainerInfo

type ContainerInfo struct {
	RuntimeSpec RuntimeSpec `json:"runtimeSpec"`
	// Ref from pb.ContainerConfig
	Config Config `json:"config"`
}

Only define required info

type CriClient

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

CriClient struct holds the runtime service client

func NewCRIClient

func NewCRIClient() (*CriClient, error)

NewCRIClient initializes a new CRI client

func (*CriClient) GetEnvVars

func (cc *CriClient) GetEnvVars(containerID string) (map[string]string, error)

GetEnvVars returns the environment variables of a given container

func (*CriClient) GetNetworkNamespace

func (cc *CriClient) GetNetworkNamespace(containerID string) (string, error)

GetNetworkNamespace returns the network namespace of a given container

type KeyValue

type KeyValue struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}

type LinuxNamespace

type LinuxNamespace struct {
	Type string `json:"type"`
	Path string `json:"path"`
}

type LinuxProcess

type LinuxProcess struct {
	Env []string `json:"env"`
}

type LinuxRuntimeSpec

type LinuxRuntimeSpec struct {
	Namespaces []LinuxNamespace `json:"namespaces"`
}

type RuntimeSpec

type RuntimeSpec struct {
	Linux   *LinuxRuntimeSpec `json:"linux"`
	Process *LinuxProcess     `json:"process"`
}

Jump to

Keyboard shortcuts

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