utils

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientSet

func GetClientSet() (*kubernetes.Clientset, error)

func IsIPv4

func IsIPv4(ipFamily string) bool

func IsIPv6

func IsIPv6(ipFamily string) bool

func ParseNFQLB

func ParseNFQLB(output string) int

func PodExec

func PodExec(pod *corev1.Pod, container string, command []string) (string, error)

func PodHasNetworkInterface

func PodHasNetworkInterface(pod *corev1.Pod, container string, interfaceSubName string) (bool, error)

func VIPPort

func VIPPort(vip string, port int) string

Types

type CTraffic

type CTraffic struct {
	NConn int
	Rate  int
}

func (*CTraffic) AnalyzeTraffic

func (ct *CTraffic) AnalyzeTraffic(output []byte) (map[string]int, int)

func (*CTraffic) GetCommand

func (ct *CTraffic) GetCommand(ipPort string, protocol string) string

type MConnect

type MConnect struct {
	NConn int
}

func (*MConnect) AnalyzeTraffic

func (mc *MConnect) AnalyzeTraffic(output []byte) (map[string]int, int)

func (*MConnect) GetCommand

func (mc *MConnect) GetCommand(ipPort string, protocol string) string

type StreamStatus

type StreamStatus struct {
	Trench  string
	Conduit string
	Stream  string
	Status  string
}

func ParseTargetWatch

func ParseTargetWatch(output string) []*StreamStatus

type TrafficGenerator

type TrafficGenerator interface {
	GetCommand(ipPort string, protocol string) string
	AnalyzeTraffic([]byte) (map[string]int, int)
}

type TrafficGeneratorHost

type TrafficGeneratorHost struct {
	TrafficGeneratorCommand string
}

func (*TrafficGeneratorHost) SendTraffic

func (tgh *TrafficGeneratorHost) SendTraffic(tg TrafficGenerator, trench string, namespace string, ipPort string, protocol string) (map[string]int, int)

Jump to

Keyboard shortcuts

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