testclient

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deployment

func Deployment(c client.Client) func(namespace, name string) appsv1.Deployment

Deployment returns a deployment by name in a given namespace.

func DeploymentConfig

func DeploymentConfig(c client.Client) func(namespace, name string) osappsv1.DeploymentConfig

DeploymentConfig returns a deploymentconfig by name in a given namespace.

func DeploymentConfigWithError

func DeploymentConfigWithError(c client.Client) func(namespace, name string) (osappsv1.DeploymentConfig, error)

DeploymentConfigWithError returns a deploymentconfig by name in a given namespace or error.

func DeploymentWithError

func DeploymentWithError(c client.Client) func(namespace, name string) (appsv1.Deployment, error)

DeploymentWithError returns a deployment by name in a given namespace or error.

func DestinationRule

func DestinationRule(c client.Client) func(namespace, name string) istionetwork.DestinationRule

DestinationRule returns a destinationrule by name in a given namespace.

func DestinationRules added in v0.1.0

func DestinationRules(c client.Client) func(namespace string, predicates ...Predicate) istionetwork.DestinationRuleList

DestinationRules returns all DestinationRules in a given namespace. When predicates are provided all of them should be satisfied in order to keep the element on the list.

func Gateway

func Gateway(c client.Client) func(namespace, name string) istionetwork.Gateway

Gateway returns a gateway by name in a given namespace.

func Session

func Session(c client.Client) func(namespace, name string) v1alpha1.Session

Session returns a session by name in a given namespace.

func VirtualService

func VirtualService(c client.Client) func(namespace, name string) istionetwork.VirtualService

VirtualService returns a virtualservice by name in a given namespace.

func VirtualServices

func VirtualServices(c client.Client) func(namespace string) istionetwork.VirtualServiceList

VirtualServices returns all virtualservices in a given namespace.

Types

type Getters

type Getters struct {
	Session                   func(namespace, name string) v1alpha1.Session
	Gateway                   func(namespace, name string) istionetwork.Gateway
	DestinationRule           func(namespace, name string) istionetwork.DestinationRule
	DestinationRules          func(namespace string, predicates ...Predicate) istionetwork.DestinationRuleList
	VirtualService            func(namespace, name string) istionetwork.VirtualService
	Deployment                func(namespace, name string) appsv1.Deployment
	DeploymentWithError       func(namespace, name string) (appsv1.Deployment, error)
	DeploymentConfig          func(namespace, name string) osappsv1.DeploymentConfig
	DeploymentConfigWithError func(namespace, name string) (osappsv1.DeploymentConfig, error)
	VirtualServices           func(namespace string) istionetwork.VirtualServiceList
}

Getters simple struct to hold funcs.

func New

func New(c client.Client) *Getters

New returns a new set of Getters for a given Client.

type Predicate added in v0.1.0

type Predicate func(c client.Object) bool
var HasRefPredicate Predicate = func(c client.Object) bool {
	return len(reference.Get(c)) != 0
}

Jump to

Keyboard shortcuts

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