utils

package
v0.0.0-...-21cfbab Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0, Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LastRunOutput string
View Source
var NoOptions = options.SetOptions{}

Functions

func Command

func Command(name string, args ...string) *exec.Cmd

func ConnMTU

func ConnMTU(hsc HasSyscallConn) (int, error)

ConnMTU returns the MTU of the connection for _connected_ connections. That excludes unconnected udp which requires different approach for each peer.

func GetCommandOutput

func GetCommandOutput(command string, args ...string) (string, error)

func GetEtcdClient

func GetEtcdClient(etcdIP string) client.Interface

func GetSysArch

func GetSysArch() string

func IPSetIDForSelector

func IPSetIDForSelector(rawSelector string) string

func IPSetNameForSelector

func IPSetNameForSelector(ipVersion int, rawSelector string) string

func LogOutput

func LogOutput(cmd *exec.Cmd, name string) error

func Run

func Run(command string, args ...string)

func RunCommand

func RunCommand(command string, args ...string) error

func RunMayFail

func RunMayFail(command string, args ...string) error

func RunWithInput

func RunWithInput(input []byte, command string, args ...string)

func UpdateFelixConfig

func UpdateFelixConfig(client client.Interface, deltaFn func(*api.FelixConfiguration))

Types

type EnvConfig

type EnvConfig struct {
	// Note: These are overridden in the Makefile!
	FelixImage   string `default:"calico/felix:latest"`
	EtcdImage    string `default:"quay.io/coreos/etcd"`
	K8sImage     string `default:"calico/go-build:latest"`
	TyphaImage   string `default:"calico/typha:latest"`
	BusyboxImage string `default:"busybox:latest"`
}
var Config EnvConfig

type HasSyscallConn

type HasSyscallConn interface {
	SyscallConn() (syscall.RawConn, error)
}

HasSyscallConn represents objects that can return a syscall.RawConn

Jump to

Keyboard shortcuts

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