util

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultRuntimeClientTimeout = 2*time.Minute - 1*time.Second
	DefaultKubeClientTimeout    = 2 * time.Minute

	DefaultDataStoreClientTimeout = 1 * time.Minute

	DefaultMessageQueueTimeout = 1 * time.Minute
)

Variables

This section is empty.

Functions

func CalculateChecksum

func CalculateChecksum(filePath string) ([]byte, error)

func ConcatenateNamespaceAndName

func ConcatenateNamespaceAndName(namespace string, name string) string

func GetTimeoutContext

func GetTimeoutContext(
	timeout time.Duration) (context.Context, context.CancelFunc)

func PrintFlags

func PrintFlags(flags *pflag.FlagSet)

func SetupSignalHandler

func SetupSignalHandler() <-chan struct{}

func SplitIntoNamespaceAndName

func SplitIntoNamespaceAndName(
	namespaceAndName string) (string, string, error)

Types

type ProcFs

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

func (*ProcFs) GetCommandLine

func (pf *ProcFs) GetCommandLine(pid int) ([]byte, error)

func (*ProcFs) GetCommandPath

func (pf *ProcFs) GetCommandPath(pid int) (string, error)

func (*ProcFs) GetCurrentWorkingDirectory

func (pf *ProcFs) GetCurrentWorkingDirectory(pid int) (string, error)

func (*ProcFs) GetMountNamespace

func (pf *ProcFs) GetMountNamespace(pid int) (string, error)

func (*ProcFs) GetProcFsRootPath

func (pf *ProcFs) GetProcFsRootPath() string

type ProcFsOperations

type ProcFsOperations interface {
	GetProcFsRootPath() string
	GetCommandPath(pid int) (string, error)
	GetMountNamespace(pid int) (string, error)
	GetCommandLine(pid int) ([]byte, error)
	GetCurrentWorkingDirectory(pid int) (string, error)
}

func NewProcFs

func NewProcFs() ProcFsOperations

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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