Documentation
¶
Index ¶
- Variables
- func GetAddressAndDialer(endpoint string) (string, func(ctx context.Context, addr string) (net.Conn, error), error)
- func GetContainerIDFromContainerName(containerName string, cfg *CrioConfig) string
- func GetContainerPid(containerID string, cfg *CrioConfig) int
- func Get_CRICTL_CONFIG()
- func Initialize(cfg *CrioConfig) error
- func ListContainers(runtimeClient runtimeapi.RuntimeServiceClient, ...) error
- func NetDial()
- func RuntimeServiceTestfunc(cfg *CrioConfig) error
- type Container
- type CrioConfig
- type Information
- type Inspect
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CRIO_CONFIG_DIR = "/etc/crictl.yaml" DEFAULT_RUNTIME_ENDPOINTS = []string{"unix:///var/run/crio/crio.sock"} DEFAULT_IMAGE_ENDPOINTS = []string{"unix:///var/run/crio/crio.sock"} DEFAULT_TIMEOUT = "5s" // RuntimeEndpoint is CRI server runtime endpoint RuntimeEndpoint string // RuntimeEndpointIsSet is true when RuntimeEndpoint is configured RuntimeEndpointIsSet bool // ImageEndpoint is CRI server image endpoint, default same as runtime endpoint ImageEndpoint string // ImageEndpointIsSet is true when ImageEndpoint is configured ImageEndpointIsSet bool // Timeout of connecting to server (default: 10s) Timeout time.Duration // Debug enable debug output Debug bool // PullImageOnCreate enables pulling image on create requests PullImageOnCreate bool // DisablePullOnRun disable pulling image on run requests DisablePullOnRun bool )
Functions ¶
func GetAddressAndDialer ¶
func GetAddressAndDialer(endpoint string) (string, func(ctx context.Context, addr string) (net.Conn, error), error)
code clone from https://github.com/kubernetes/kubernetes/blob/v1.22.2/pkg/kubelet/util/util_unix.go#L82 due to broken package dependency // Start
func GetContainerIDFromContainerName ¶
func GetContainerIDFromContainerName(containerName string, cfg *CrioConfig) string
// kubelet code cloned
func GetContainerPid ¶
func GetContainerPid(containerID string, cfg *CrioConfig) int
func Get_CRICTL_CONFIG ¶
func Get_CRICTL_CONFIG()
func Initialize ¶
func Initialize(cfg *CrioConfig) error
func ListContainers ¶
func ListContainers(runtimeClient runtimeapi.RuntimeServiceClient, imageClient runtimeapi.ImageServiceClient, opts listOptions) error
func RuntimeServiceTestfunc ¶
func RuntimeServiceTestfunc(cfg *CrioConfig) error
Types ¶
type Container ¶
type Container struct {
Info Information `json:"info"`
}
type CrioConfig ¶
type CrioConfig struct { // RuntimeEndpoint is CRI server runtime endpoint RuntimeEndpoint string // RuntimeEndpointIsSet is true when RuntimeEndpoint is configured RuntimeEndpointIsSet bool // ImageEndpoint is CRI server image endpoint, default same as runtime endpoint ImageEndpoint string // ImageEndpointIsSet is true when ImageEndpoint is configured ImageEndpointIsSet bool // Timeout of connecting to server (default: 10s) Timeout time.Duration // Debug enable debug output Debug bool // PullImageOnCreate enables pulling image on create requests PullImageOnCreate bool // DisablePullOnRun disable pulling image on run requests DisablePullOnRun bool }
type Information ¶
type Information struct {
Pid int `json:"pid"`
}
Click to show internal directories.
Click to hide internal directories.