client

package
v2.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CtrlServerPort = 10082
)

Variables

This section is empty.

Functions

func DisableRuntimeErrorHandler

func DisableRuntimeErrorHandler()

disable error handler in k8s runtime TODO: ignore specific errors only

func ForwardCtrlServer

func ForwardCtrlServer(ctx context.Context, ns, managerSvc string) (context.CancelFunc, uint16, error)

func ForwardSvcPorts

func ForwardSvcPorts(ctx context.Context, ns, svc string, port uint16) (context.CancelFunc, uint16, error)

Types

type CommonRestClientGetter

type CommonRestClientGetter struct {
	*genericclioptions.ConfigFlags
}

CommonRestClientGetter is used for non-e2e test environment. It's basically do the same thing as genericclioptions.ConfigFlags, but it load rest config from incluster or .kubeconfig file

func NewCommonRestClientGetter

func NewCommonRestClientGetter() *CommonRestClientGetter

func (*CommonRestClientGetter) ToRESTConfig

func (it *CommonRestClientGetter) ToRESTConfig() (*rest.Config, error)

type CtrlClient

type CtrlClient struct {
	QueryClient        *graphql.Client
	SubscriptionClient *graphql.SubscriptionClient
}

func NewCtrlClient

func NewCtrlClient(url string) *CtrlClient

func (*CtrlClient) CleanIptables

func (c *CtrlClient) CleanIptables(ctx context.Context, namespace, name string, chains []string) ([]string, error)

func (*CtrlClient) CleanTcs

func (c *CtrlClient) CleanTcs(ctx context.Context, namespace, name string, devices []string) ([]string, error)

func (*CtrlClient) KillProcesses

func (c *CtrlClient) KillProcesses(ctx context.Context, namespace, name string, pids []string) ([]string, error)

func (*CtrlClient) ListNamespace

func (c *CtrlClient) ListNamespace(ctx context.Context) ([]string, error)

Jump to

Keyboard shortcuts

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