servicespec

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package servicespec contains various utilities to deal with Service Specs

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 enables users to create a serviceTemplate starting from a baseline and adding patches

func New

func New() *Builder

New creates a new empty serviceTemplate builder

func NewFrom

func NewFrom(serviceTemplate *apiv1.ServiceTemplateSpec) *Builder

NewFrom creates a serviceTemplate builder from a certain Service template

func (*Builder) Build

func (builder *Builder) Build() *apiv1.ServiceTemplateSpec

Build gets the final ServiceTemplate

func (*Builder) WithAnnotation

func (builder *Builder) WithAnnotation(name, value string) *Builder

WithAnnotation adds an annotation to the current status

func (*Builder) WithLabel

func (builder *Builder) WithLabel(name, value string) *Builder

WithLabel adds a label to the current status

func (*Builder) WithSelector

func (builder *Builder) WithSelector(name string, overwrite bool) *Builder

WithSelector adds a selector to the current status

func (*Builder) WithServicePort

func (builder *Builder) WithServicePort(value *corev1.ServicePort) *Builder

WithServicePort adds a port to the current status

func (*Builder) WithServiceType

func (builder *Builder) WithServiceType(serviceType corev1.ServiceType, overwrite bool) *Builder

WithServiceType adds a service type to the current status

Jump to

Keyboard shortcuts

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