package util

import "github.com/containerd/containerd/integration/util"

Package util holds utility functions.

Index

Functions

func CreateListener

func CreateListener(endpoint string) (net.Listener, error)

CreateListener creates a listener on the specified endpoint.

func FromApiserverCache

func FromApiserverCache(opts *metav1.GetOptions)

FromApiserverCache modifies <opts> so that the GET request will be served from apiserver cache instead of from etcd.

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.

func GetBootTime

func GetBootTime() (time.Time, error)

GetBootTime returns the time at which the machine was started, truncated to the nearest second

func IsUnixDomainSocket

func IsUnixDomainSocket(filePath string) (bool, error)

IsUnixDomainSocket returns whether a given file is a AF_UNIX socket file

func LocalEndpoint

func LocalEndpoint(path, file string) (string, error)

LocalEndpoint empty implementation

func NormalizePath

func NormalizePath(path string) string

NormalizePath converts FS paths returned by certain go frameworks (like fsnotify) to native Windows paths that can be passed to Windows specific code

Source Files

doc.go util.go util_windows.go

Version
v1.6.0-beta.1
Published
Oct 22, 2021
Platform
windows/amd64
Imports
9 packages
Last checked
1 minute ago

Tools for package owners.