service

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder is the builder object for Service

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns new instance of Builder

func (*Builder) Build

func (b *Builder) Build() (*corev1.Service, error)

Build returns the Service API instance

func (*Builder) WithAnnotations

func (b *Builder) WithAnnotations(annotations map[string]string) *Builder

WithAnnotations merges existing annotations if any with the ones that are provided here

func (*Builder) WithAnnotationsNew

func (b *Builder) WithAnnotationsNew(annotations map[string]string) *Builder

WithAnnotationsNew resets existing annotaions if any with ones that are provided here

func (*Builder) WithClusterIP

func (b *Builder) WithClusterIP(ip string) *Builder

func (*Builder) WithGenerateName

func (b *Builder) WithGenerateName(name string) *Builder

WithGenerateName sets the GenerateName field of Service with provided value

func (*Builder) WithLabels

func (b *Builder) WithLabels(labels map[string]string) *Builder

WithLabels merges existing labels if any with the ones that are provided here

func (*Builder) WithLabelsNew

func (b *Builder) WithLabelsNew(labels map[string]string) *Builder

WithLabelsNew resets existing labels if any with ones that are provided here

func (*Builder) WithName

func (b *Builder) WithName(name string) *Builder

WithName sets the Name field of Service with provided value.

func (*Builder) WithNamespace

func (b *Builder) WithNamespace(namespace string) *Builder

WithNamespace sets the Namespace field of Service provided arguments

func (*Builder) WithOwnerReferenceNew

func (b *Builder) WithOwnerReferenceNew(ownerRefernce []metav1.OwnerReference) *Builder

WithOwnerReferenceNew sets ownerrefernce if any with ones that are provided here

func (*Builder) WithPorts

func (b *Builder) WithPorts(ports []corev1.ServicePort) *Builder

WithPorts sets the Ports field of Service with provided arguments

func (*Builder) WithSelectors

func (b *Builder) WithSelectors(selectors map[string]string) *Builder

WithSelectors merges existing selectors if any with the ones that are provided here

func (*Builder) WithSelectorsNew

func (b *Builder) WithSelectorsNew(selectors map[string]string) *Builder

WithSelectorsNew resets existing selectors if any with ones that are provided here

type Predicate

type Predicate func(*Service) bool

Predicate defines an abstraction to determine conditional checks against the provided service instance

func ContainsName

func ContainsName(name string) Predicate

ContainsName is filter function to filter service's based on the name

func IsNil

func IsNil() Predicate

IsNil is predicate to filter out nil Service instances

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is a wrapper over service api object. It provides build, validations and other common logic to be used by various feature specific callers.

func NewForAPIObject

func NewForAPIObject(obj *corev1.Service,
	opts ...serviceBuildOption) *Service

NewForAPIObject returns a new instance of Service

func (*Service) IsNil

func (s *Service) IsNil() bool

IsNil returns true if the Service instance is nil

type ServiceList

type ServiceList struct {
	// contains filtered or unexported fields
}

ServiceList is a wrapper over service api object. It provides build, validations and other common logic to be used by various feature specific callers.

func (*ServiceList) Len

func (s *ServiceList) Len() int

Len returns the number of items present in the ServiceList

func (*ServiceList) ToAPIList

func (s *ServiceList) ToAPIList() *corev1.ServiceList

ToAPIList converts ServiceList to API ServiceList

Jump to

Keyboard shortcuts

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