utils

package
v0.0.0-...-bb2f907 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsTestKubeClient bool = false

IsTestKubeClient .. global variable used during unit-tests to check whether a fake kube client object has to be instantiated

Functions

func CreateCompApp

func CreateCompApp(ctx context.Context, ca CompositeApp) (string, error)

CreateCompApp creates a AppContext for a composite app, for testing

func FindApp

func FindApp(ca CompositeApp, app string) bool

FindApp finds app in the appcontext and returns true or false

func FindCluster

func FindCluster(ca CompositeApp, app string, cluster string) bool

FindCluster finds cluster in an app in the appcontext and returns true or false

func FindResource

func FindResource(ca CompositeApp, app, cluster, res string) bool

FindCluster finds resource in a cluster in an app in the appcontext and returns true or false

func PrintCompositeApp

func PrintCompositeApp(ca CompositeApp)

PrintCompositeApp prints the composite app

func ReadAppContext

func ReadAppContext(ctx context.Context, contextID interface{}) (CompositeApp, error)

ReadAppContext reads a composite app for AppContext

Types

type Connection

type Connection struct {
	Cid     string
	Clients map[string]*kubeclient.Client
	sync.Mutex
}

Connection is for a cluster

func (*Connection) GetClient

func (c *Connection) GetClient(ctx context.Context, cluster string, level string, namespace string) (*kubeclient.Client, error)

GetClient returns client for the cluster

func (*Connection) Init

func (c *Connection) Init(id interface{}) error

Init Connection for an app context

func (*Connection) RemoveClient

func (c *Connection) RemoveClient()

Jump to

Keyboard shortcuts

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