fixture

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDiscardLogger added in v1.8.0

func NewDiscardLogger() *logrus.Logger

NewDiscardLogger returns logrus.Logger that discards log messages.

func NewTestLogger added in v1.8.0

func NewTestLogger(t *testing.T) *logrus.Logger

NewTestLogger returns logrus.Logger that writes messages using (*testing.T)Logf.

func ObjectMeta

func ObjectMeta(nameStr string) metav1.ObjectMeta

ObjectMeta cracks a Kubernetes object name string of the form "namespace/name" into a metav1.ObjectMeta struct. If the namespace portion is omitted, then the default namespace is filled in.

Types

type ProxyBuilder

type ProxyBuilder v1.HTTPProxy

ProxyBuilder is a builder object to make creating HTTPProxy fixtures more succinct.

func NewProxy

func NewProxy(name string) *ProxyBuilder

NewProxy creates a new ProxyBuilder with the specified object name.

func (*ProxyBuilder) Annotate

func (b *ProxyBuilder) Annotate(k string, v string) *ProxyBuilder

Annotate adds the given values as metadata annotations.

func (*ProxyBuilder) Label

func (b *ProxyBuilder) Label(k string, v string) *ProxyBuilder

Label adds the given values as metadata labels.

func (*ProxyBuilder) WithFQDN

func (b *ProxyBuilder) WithFQDN(fqdn string) *ProxyBuilder

func (*ProxyBuilder) WithSpec

func (b *ProxyBuilder) WithSpec(spec v1.HTTPProxySpec) *v1.HTTPProxy

WithSpec updates the builder's Spec field, returning the build proxy.

type ServiceBuilder added in v1.8.0

type ServiceBuilder v1.Service

func NewService added in v1.8.0

func NewService(name string) *ServiceBuilder

NewService creates a new ServiceBuilder with the given resource name.

func (*ServiceBuilder) Annotate added in v1.8.0

func (s *ServiceBuilder) Annotate(k string, v string) *ServiceBuilder

Annotate adds the given values as metadata annotations.

func (*ServiceBuilder) WithPorts added in v1.8.0

func (s *ServiceBuilder) WithPorts(ports ...v1.ServicePort) *v1.Service

WithPorts specifies the ports for the .Spec.Ports field.

func (*ServiceBuilder) WithSpec added in v1.8.0

func (s *ServiceBuilder) WithSpec(spec v1.ServiceSpec) *v1.Service

WithSpec specifies the .Spec field.

Jump to

Keyboard shortcuts

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