autodetects

package module
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: BSD-3-Clause Imports: 19 Imported by: 0

README

Autodetects

Autodetects is the Go based utility that autodetects underlying Container Runtime in Kubernetes.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoDetectRuntime

func AutoDetectRuntime() (string, string, error)

AutoDetectRuntime auto detects the underlying container runtime like docker, containerd

func GetAddressAndDialer

func GetAddressAndDialer(endpoint string) (string, func(ctx context.Context, addr string) (net.Conn, error), error)

GetAddressAndDialer returns the address parsed from the given endpoint and a context dialer.

Types

type Runtime

type Runtime interface {
	ExtractImage(imageID string, imageName string, path string) error
	GetImageID(imageName string) ([]byte, error)
	Save(imageName, outputParam string) ([]byte, error)
	GetSocket() string
	ExtractFileSystem(imageTarPath string, outputTarPath string, imageName string, socketPath string) error
	ExtractFileSystemContainer(containerId string, namespace string, outputTarPath string, socketPath string) error
}

Runtime interface, interfaces all the container runtime methods

func NewRuntime

func NewRuntime() (Runtime, error)

NewRuntime Auto detect and returns the runtime available for the current system

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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