Documentation ¶
Index ¶
- func NewAllowedRoutesFromAllNamespaces() *gatewayapi.AllowedRoutes
- func NewAllowedRoutesFromSameNamespaces() *gatewayapi.AllowedRoutes
- func NewAllowedRoutesFromSelectorNamespace(selector *metav1.LabelSelector) *gatewayapi.AllowedRoutes
- type BackendRefBuilder
- func (b *BackendRefBuilder) Build() gatewayapi.BackendRef
- func (b *BackendRefBuilder) ToSlice() []gatewayapi.BackendRef
- func (b *BackendRefBuilder) WithGroup(group string) *BackendRefBuilder
- func (b *BackendRefBuilder) WithKind(kind string) *BackendRefBuilder
- func (b *BackendRefBuilder) WithNamespace(namespace string) *BackendRefBuilder
- func (b *BackendRefBuilder) WithPort(port int) *BackendRefBuilder
- func (b *BackendRefBuilder) WithWeight(weight int) *BackendRefBuilder
- type EndpointPortBuilder
- type HTTPBackendRefBuilder
- func (b *HTTPBackendRefBuilder) Build() gatewayapi.HTTPBackendRef
- func (b *HTTPBackendRefBuilder) ToSlice() []gatewayapi.HTTPBackendRef
- func (b *HTTPBackendRefBuilder) WithGroup(group string) *HTTPBackendRefBuilder
- func (b *HTTPBackendRefBuilder) WithKind(kind string) *HTTPBackendRefBuilder
- func (b *HTTPBackendRefBuilder) WithNamespace(namespace string) *HTTPBackendRefBuilder
- func (b *HTTPBackendRefBuilder) WithPort(port int) *HTTPBackendRefBuilder
- func (b *HTTPBackendRefBuilder) WithWeight(weight int) *HTTPBackendRefBuilder
- type HTTPRouteFilterBuilder
- func (b *HTTPRouteFilterBuilder) Build() gatewayapi.HTTPRouteFilter
- func (b *HTTPRouteFilterBuilder) WithRequestHeaderAdd(headers []gatewayapi.HTTPHeader) *HTTPRouteFilterBuilder
- func (b *HTTPRouteFilterBuilder) WithRequestHeaderRemove(headerNames []string) *HTTPRouteFilterBuilder
- func (b *HTTPRouteFilterBuilder) WithRequestHeaderSet(headers []gatewayapi.HTTPHeader) *HTTPRouteFilterBuilder
- func (b *HTTPRouteFilterBuilder) WithRequestRedirectHost(host string) *HTTPRouteFilterBuilder
- func (b *HTTPRouteFilterBuilder) WithRequestRedirectScheme(scheme string) *HTTPRouteFilterBuilder
- func (b *HTTPRouteFilterBuilder) WithRequestRedirectStatusCode(code int) *HTTPRouteFilterBuilder
- type HTTPRouteMatchBuilder
- func (b *HTTPRouteMatchBuilder) Build() gatewayapi.HTTPRouteMatch
- func (b *HTTPRouteMatchBuilder) ToSlice() []gatewayapi.HTTPRouteMatch
- func (b *HTTPRouteMatchBuilder) WithHeader(name, value string) *HTTPRouteMatchBuilder
- func (b *HTTPRouteMatchBuilder) WithHeaderRegex(name, value string) *HTTPRouteMatchBuilder
- func (b *HTTPRouteMatchBuilder) WithMethod(method gatewayapi.HTTPMethod) *HTTPRouteMatchBuilder
- func (b *HTTPRouteMatchBuilder) WithPathExact(pathRegexp string) *HTTPRouteMatchBuilder
- func (b *HTTPRouteMatchBuilder) WithPathPrefix(pathPrefix string) *HTTPRouteMatchBuilder
- func (b *HTTPRouteMatchBuilder) WithPathRegex(pathRegexp string) *HTTPRouteMatchBuilder
- func (b *HTTPRouteMatchBuilder) WithPathType(pathValuePtr *string, pathTypePtr *gatewayapi.PathMatchType) *HTTPRouteMatchBuilder
- func (b *HTTPRouteMatchBuilder) WithQueryParam(name, value string) *HTTPRouteMatchBuilder
- func (b *HTTPRouteMatchBuilder) WithQueryParamRegex(name, value string) *HTTPRouteMatchBuilder
- type IngressBuilder
- func (b *IngressBuilder) Build() *netv1.Ingress
- func (b *IngressBuilder) WithAnnotations(annotations map[string]string) *IngressBuilder
- func (b *IngressBuilder) WithDefaultBackend(backend *netv1.IngressBackend) *IngressBuilder
- func (b *IngressBuilder) WithKongPlugins(names ...string) *IngressBuilder
- func (b *IngressBuilder) WithLegacyClassAnnotation(class string) *IngressBuilder
- func (b *IngressBuilder) WithNamespace(namespace string) *IngressBuilder
- func (b *IngressBuilder) WithRules(rules ...netv1.IngressRule) *IngressBuilder
- type KongstateServiceBackendBuilder
- func (b *KongstateServiceBackendBuilder) MustBuild() kongstate.ServiceBackend
- func (b *KongstateServiceBackendBuilder) WithNamespace(namespace string) *KongstateServiceBackendBuilder
- func (b *KongstateServiceBackendBuilder) WithPortName(port string) *KongstateServiceBackendBuilder
- func (b *KongstateServiceBackendBuilder) WithPortNumber(port int) *KongstateServiceBackendBuilder
- func (b *KongstateServiceBackendBuilder) WithType(t kongstate.ServiceBackendType) *KongstateServiceBackendBuilder
- func (b *KongstateServiceBackendBuilder) WithWeight(weight int) *KongstateServiceBackendBuilder
- type ListenerBuilder
- func (b *ListenerBuilder) Build() gatewayapi.Listener
- func (b *ListenerBuilder) HTTP() *ListenerBuilder
- func (b *ListenerBuilder) HTTPS() *ListenerBuilder
- func (b *ListenerBuilder) IntoSlice() []gatewayapi.Listener
- func (b *ListenerBuilder) TCP() *ListenerBuilder
- func (b *ListenerBuilder) TLS() *ListenerBuilder
- func (b *ListenerBuilder) UDP() *ListenerBuilder
- func (b *ListenerBuilder) WithAllowedRoutes(routes *gatewayapi.AllowedRoutes) *ListenerBuilder
- func (b *ListenerBuilder) WithHostname(hostname string) *ListenerBuilder
- func (b *ListenerBuilder) WithPort(port int) *ListenerBuilder
- func (b *ListenerBuilder) WithTLSConfig(tlsConfig *gatewayapi.GatewayTLSConfig) *ListenerBuilder
- type RouteGroupKindBuilder
- func (b *RouteGroupKindBuilder) Build() gatewayapi.RouteGroupKind
- func (b *RouteGroupKindBuilder) GRPCRoute() *RouteGroupKindBuilder
- func (b *RouteGroupKindBuilder) HTTPRoute() *RouteGroupKindBuilder
- func (b *RouteGroupKindBuilder) IntoSlice() []gatewayapi.RouteGroupKind
- func (b *RouteGroupKindBuilder) TCPRoute() *RouteGroupKindBuilder
- func (b *RouteGroupKindBuilder) TLSRoute() *RouteGroupKindBuilder
- func (b *RouteGroupKindBuilder) UDPRoute() *RouteGroupKindBuilder
- type RouteNamespacesBuilder
- type ServicePortBuilder
- func (b *ServicePortBuilder) Build() corev1.ServicePort
- func (b *ServicePortBuilder) IntoSlice() []corev1.ServicePort
- func (b *ServicePortBuilder) WithAppProtocol(appproto string) *ServicePortBuilder
- func (b *ServicePortBuilder) WithName(name string) *ServicePortBuilder
- func (b *ServicePortBuilder) WithNodePort(port int32) *ServicePortBuilder
- func (b *ServicePortBuilder) WithPort(port int32) *ServicePortBuilder
- func (b *ServicePortBuilder) WithProtocol(proto corev1.Protocol) *ServicePortBuilder
- func (b *ServicePortBuilder) WithTargetPort(targetport intstr.IntOrString) *ServicePortBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAllowedRoutesFromAllNamespaces ¶
func NewAllowedRoutesFromAllNamespaces() *gatewayapi.AllowedRoutes
func NewAllowedRoutesFromSameNamespaces ¶
func NewAllowedRoutesFromSameNamespaces() *gatewayapi.AllowedRoutes
func NewAllowedRoutesFromSelectorNamespace ¶
func NewAllowedRoutesFromSelectorNamespace(selector *metav1.LabelSelector) *gatewayapi.AllowedRoutes
Types ¶
type BackendRefBuilder ¶
type BackendRefBuilder struct {
// contains filtered or unexported fields
}
BackendRefBuilder is a builder for gateway api BackendRef. Will set default values, as specified in the gateway API, for fields that are not set. Primarily used for testing.
func NewBackendRef ¶
func NewBackendRef(name string) *BackendRefBuilder
func (*BackendRefBuilder) Build ¶
func (b *BackendRefBuilder) Build() gatewayapi.BackendRef
func (*BackendRefBuilder) ToSlice ¶
func (b *BackendRefBuilder) ToSlice() []gatewayapi.BackendRef
func (*BackendRefBuilder) WithGroup ¶
func (b *BackendRefBuilder) WithGroup(group string) *BackendRefBuilder
func (*BackendRefBuilder) WithKind ¶
func (b *BackendRefBuilder) WithKind(kind string) *BackendRefBuilder
func (*BackendRefBuilder) WithNamespace ¶
func (b *BackendRefBuilder) WithNamespace(namespace string) *BackendRefBuilder
func (*BackendRefBuilder) WithPort ¶
func (b *BackendRefBuilder) WithPort(port int) *BackendRefBuilder
func (*BackendRefBuilder) WithWeight ¶
func (b *BackendRefBuilder) WithWeight(weight int) *BackendRefBuilder
type EndpointPortBuilder ¶
type EndpointPortBuilder struct {
// contains filtered or unexported fields
}
EndpointPortBuilder is a builder for discovery v1 EndpointPort. Primarily used for testing.
func NewEndpointPort ¶
func NewEndpointPort(port int32) *EndpointPortBuilder
func (*EndpointPortBuilder) Build ¶
func (b *EndpointPortBuilder) Build() discoveryv1.EndpointPort
Build returns the configured EndpointPort.
func (*EndpointPortBuilder) IntoSlice ¶
func (b *EndpointPortBuilder) IntoSlice() []discoveryv1.EndpointPort
IntoSlice returns the configured EndpointPort in a slice.
func (*EndpointPortBuilder) WithName ¶
func (b *EndpointPortBuilder) WithName(name string) *EndpointPortBuilder
WithName sets the name on the endpoint port.
func (*EndpointPortBuilder) WithProtocol ¶
func (b *EndpointPortBuilder) WithProtocol(proto corev1.Protocol) *EndpointPortBuilder
WithProtocol sets the protocol on the endpoint port.
type HTTPBackendRefBuilder ¶
type HTTPBackendRefBuilder struct {
// contains filtered or unexported fields
}
HTTPBackendRefBuilder is a builder for gateway api HTTPBackendRef. Will set default values, as specified in the gateway API, for fields that are not set. Primarily used for testing.
func NewHTTPBackendRef ¶
func NewHTTPBackendRef(name string) *HTTPBackendRefBuilder
func (*HTTPBackendRefBuilder) Build ¶
func (b *HTTPBackendRefBuilder) Build() gatewayapi.HTTPBackendRef
func (*HTTPBackendRefBuilder) ToSlice ¶
func (b *HTTPBackendRefBuilder) ToSlice() []gatewayapi.HTTPBackendRef
func (*HTTPBackendRefBuilder) WithGroup ¶
func (b *HTTPBackendRefBuilder) WithGroup(group string) *HTTPBackendRefBuilder
func (*HTTPBackendRefBuilder) WithKind ¶
func (b *HTTPBackendRefBuilder) WithKind(kind string) *HTTPBackendRefBuilder
func (*HTTPBackendRefBuilder) WithNamespace ¶
func (b *HTTPBackendRefBuilder) WithNamespace(namespace string) *HTTPBackendRefBuilder
func (*HTTPBackendRefBuilder) WithPort ¶
func (b *HTTPBackendRefBuilder) WithPort(port int) *HTTPBackendRefBuilder
func (*HTTPBackendRefBuilder) WithWeight ¶
func (b *HTTPBackendRefBuilder) WithWeight(weight int) *HTTPBackendRefBuilder
type HTTPRouteFilterBuilder ¶
type HTTPRouteFilterBuilder struct {
// contains filtered or unexported fields
}
HTTPRouteFilterBuilder is a builder for gateway api HTTPRouteMatch. Primarily used for testing.
func NewHTTPRouteRequestHeaderModifierFilter ¶
func NewHTTPRouteRequestHeaderModifierFilter() *HTTPRouteFilterBuilder
NewHTTPRouteRequestHeaderModifierFilter builds a request header modifier HTTPRoute filter.
func NewHTTPRouteRequestRedirectFilter ¶
func NewHTTPRouteRequestRedirectFilter() *HTTPRouteFilterBuilder
NewHTTPRouteRequestRedirectFilter builds a request redirect HTTPRoute filter.
func (*HTTPRouteFilterBuilder) Build ¶
func (b *HTTPRouteFilterBuilder) Build() gatewayapi.HTTPRouteFilter
func (*HTTPRouteFilterBuilder) WithRequestHeaderAdd ¶
func (b *HTTPRouteFilterBuilder) WithRequestHeaderAdd(headers []gatewayapi.HTTPHeader) *HTTPRouteFilterBuilder
func (*HTTPRouteFilterBuilder) WithRequestHeaderRemove ¶
func (b *HTTPRouteFilterBuilder) WithRequestHeaderRemove(headerNames []string) *HTTPRouteFilterBuilder
func (*HTTPRouteFilterBuilder) WithRequestHeaderSet ¶
func (b *HTTPRouteFilterBuilder) WithRequestHeaderSet(headers []gatewayapi.HTTPHeader) *HTTPRouteFilterBuilder
func (*HTTPRouteFilterBuilder) WithRequestRedirectHost ¶
func (b *HTTPRouteFilterBuilder) WithRequestRedirectHost(host string) *HTTPRouteFilterBuilder
WithRequestRedirectHost sets host of request redirect filter.
func (*HTTPRouteFilterBuilder) WithRequestRedirectScheme ¶
func (b *HTTPRouteFilterBuilder) WithRequestRedirectScheme(scheme string) *HTTPRouteFilterBuilder
WithRequestRedirectScheme sets scheme of request redirect filter.
func (*HTTPRouteFilterBuilder) WithRequestRedirectStatusCode ¶
func (b *HTTPRouteFilterBuilder) WithRequestRedirectStatusCode(code int) *HTTPRouteFilterBuilder
WithRequestRedirectStatusCode sets status code of response in request redirect filter.
type HTTPRouteMatchBuilder ¶
type HTTPRouteMatchBuilder struct {
// contains filtered or unexported fields
}
HTTPRouteMatchBuilder is a builder for gateway api HTTPRouteMatch. Primarily used for testing. Please note that some methods are not provided yet, as we don't need them yet. Feel free to add them as needed.
func NewHTTPRouteMatch ¶
func NewHTTPRouteMatch() *HTTPRouteMatchBuilder
func (*HTTPRouteMatchBuilder) Build ¶
func (b *HTTPRouteMatchBuilder) Build() gatewayapi.HTTPRouteMatch
func (*HTTPRouteMatchBuilder) ToSlice ¶
func (b *HTTPRouteMatchBuilder) ToSlice() []gatewayapi.HTTPRouteMatch
func (*HTTPRouteMatchBuilder) WithHeader ¶
func (b *HTTPRouteMatchBuilder) WithHeader(name, value string) *HTTPRouteMatchBuilder
func (*HTTPRouteMatchBuilder) WithHeaderRegex ¶
func (b *HTTPRouteMatchBuilder) WithHeaderRegex(name, value string) *HTTPRouteMatchBuilder
func (*HTTPRouteMatchBuilder) WithMethod ¶
func (b *HTTPRouteMatchBuilder) WithMethod(method gatewayapi.HTTPMethod) *HTTPRouteMatchBuilder
func (*HTTPRouteMatchBuilder) WithPathExact ¶
func (b *HTTPRouteMatchBuilder) WithPathExact(pathRegexp string) *HTTPRouteMatchBuilder
func (*HTTPRouteMatchBuilder) WithPathPrefix ¶
func (b *HTTPRouteMatchBuilder) WithPathPrefix(pathPrefix string) *HTTPRouteMatchBuilder
func (*HTTPRouteMatchBuilder) WithPathRegex ¶
func (b *HTTPRouteMatchBuilder) WithPathRegex(pathRegexp string) *HTTPRouteMatchBuilder
func (*HTTPRouteMatchBuilder) WithPathType ¶
func (b *HTTPRouteMatchBuilder) WithPathType(pathValuePtr *string, pathTypePtr *gatewayapi.PathMatchType) *HTTPRouteMatchBuilder
func (*HTTPRouteMatchBuilder) WithQueryParam ¶
func (b *HTTPRouteMatchBuilder) WithQueryParam(name, value string) *HTTPRouteMatchBuilder
func (*HTTPRouteMatchBuilder) WithQueryParamRegex ¶
func (b *HTTPRouteMatchBuilder) WithQueryParamRegex(name, value string) *HTTPRouteMatchBuilder
type IngressBuilder ¶
type IngressBuilder struct {
// contains filtered or unexported fields
}
func NewIngress ¶
func NewIngress(name string, class string) *IngressBuilder
NewIngress builds an Ingress object with the given name and class, when "" is passed as class parameter the field .Spec.IngressClassName is not set.
func (*IngressBuilder) Build ¶
func (b *IngressBuilder) Build() *netv1.Ingress
func (*IngressBuilder) WithAnnotations ¶ added in v3.1.0
func (b *IngressBuilder) WithAnnotations(annotations map[string]string) *IngressBuilder
func (*IngressBuilder) WithDefaultBackend ¶ added in v3.1.0
func (b *IngressBuilder) WithDefaultBackend(backend *netv1.IngressBackend) *IngressBuilder
func (*IngressBuilder) WithKongPlugins ¶ added in v3.2.0
func (b *IngressBuilder) WithKongPlugins(names ...string) *IngressBuilder
func (*IngressBuilder) WithLegacyClassAnnotation ¶
func (b *IngressBuilder) WithLegacyClassAnnotation(class string) *IngressBuilder
func (*IngressBuilder) WithNamespace ¶ added in v3.1.0
func (b *IngressBuilder) WithNamespace(namespace string) *IngressBuilder
func (*IngressBuilder) WithRules ¶
func (b *IngressBuilder) WithRules(rules ...netv1.IngressRule) *IngressBuilder
type KongstateServiceBackendBuilder ¶
type KongstateServiceBackendBuilder struct {
// contains filtered or unexported fields
}
KongstateServiceBackendBuilder is a builder for KongstateServiceBackend. Primarily used for testing.
func NewKongstateServiceBackend ¶
func NewKongstateServiceBackend(name string) *KongstateServiceBackendBuilder
func (*KongstateServiceBackendBuilder) MustBuild ¶ added in v3.1.0
func (b *KongstateServiceBackendBuilder) MustBuild() kongstate.ServiceBackend
func (*KongstateServiceBackendBuilder) WithNamespace ¶
func (b *KongstateServiceBackendBuilder) WithNamespace(namespace string) *KongstateServiceBackendBuilder
func (*KongstateServiceBackendBuilder) WithPortName ¶ added in v3.1.0
func (b *KongstateServiceBackendBuilder) WithPortName(port string) *KongstateServiceBackendBuilder
func (*KongstateServiceBackendBuilder) WithPortNumber ¶
func (b *KongstateServiceBackendBuilder) WithPortNumber(port int) *KongstateServiceBackendBuilder
func (*KongstateServiceBackendBuilder) WithType ¶ added in v3.1.0
func (b *KongstateServiceBackendBuilder) WithType(t kongstate.ServiceBackendType) *KongstateServiceBackendBuilder
func (*KongstateServiceBackendBuilder) WithWeight ¶
func (b *KongstateServiceBackendBuilder) WithWeight(weight int) *KongstateServiceBackendBuilder
type ListenerBuilder ¶
type ListenerBuilder struct {
// contains filtered or unexported fields
}
ListenerBuilder is a builder for gateway api Listener. Will set default values, as specified in the gateway API, for fields that are not set. Primarily used for testing.
func NewListener ¶
func NewListener(name string) *ListenerBuilder
func (*ListenerBuilder) Build ¶
func (b *ListenerBuilder) Build() gatewayapi.Listener
Build returns the configured Listener.
func (*ListenerBuilder) HTTP ¶
func (b *ListenerBuilder) HTTP() *ListenerBuilder
func (*ListenerBuilder) HTTPS ¶
func (b *ListenerBuilder) HTTPS() *ListenerBuilder
func (*ListenerBuilder) IntoSlice ¶
func (b *ListenerBuilder) IntoSlice() []gatewayapi.Listener
IntoSlice returns the configured Listener in a slice.
func (*ListenerBuilder) TCP ¶
func (b *ListenerBuilder) TCP() *ListenerBuilder
func (*ListenerBuilder) TLS ¶
func (b *ListenerBuilder) TLS() *ListenerBuilder
func (*ListenerBuilder) UDP ¶
func (b *ListenerBuilder) UDP() *ListenerBuilder
func (*ListenerBuilder) WithAllowedRoutes ¶
func (b *ListenerBuilder) WithAllowedRoutes(routes *gatewayapi.AllowedRoutes) *ListenerBuilder
func (*ListenerBuilder) WithHostname ¶
func (b *ListenerBuilder) WithHostname(hostname string) *ListenerBuilder
func (*ListenerBuilder) WithPort ¶
func (b *ListenerBuilder) WithPort(port int) *ListenerBuilder
func (*ListenerBuilder) WithTLSConfig ¶
func (b *ListenerBuilder) WithTLSConfig(tlsConfig *gatewayapi.GatewayTLSConfig) *ListenerBuilder
type RouteGroupKindBuilder ¶
type RouteGroupKindBuilder struct {
// contains filtered or unexported fields
}
RouteGroupKindBuilder is a builder for gateway api RouteGroupKind. Will set default values, as specified in the gateway API, for fields that are not set. Primarily used for testing.
func NewRouteGroupKind ¶
func NewRouteGroupKind() *RouteGroupKindBuilder
func (*RouteGroupKindBuilder) Build ¶
func (b *RouteGroupKindBuilder) Build() gatewayapi.RouteGroupKind
Build returns the configured RouteGroupKind.
func (*RouteGroupKindBuilder) GRPCRoute ¶
func (b *RouteGroupKindBuilder) GRPCRoute() *RouteGroupKindBuilder
func (*RouteGroupKindBuilder) HTTPRoute ¶
func (b *RouteGroupKindBuilder) HTTPRoute() *RouteGroupKindBuilder
func (*RouteGroupKindBuilder) IntoSlice ¶
func (b *RouteGroupKindBuilder) IntoSlice() []gatewayapi.RouteGroupKind
IntoSlice returns the configured RouteGroupKind in a slice.
func (*RouteGroupKindBuilder) TCPRoute ¶
func (b *RouteGroupKindBuilder) TCPRoute() *RouteGroupKindBuilder
func (*RouteGroupKindBuilder) TLSRoute ¶
func (b *RouteGroupKindBuilder) TLSRoute() *RouteGroupKindBuilder
func (*RouteGroupKindBuilder) UDPRoute ¶
func (b *RouteGroupKindBuilder) UDPRoute() *RouteGroupKindBuilder
type RouteNamespacesBuilder ¶
type RouteNamespacesBuilder struct {
// contains filtered or unexported fields
}
RouteNamespacesBuilder is a builder for gateway api RouteNamespaces. Will set default values, as specified in the gateway API, for fields that are not set. Primarily used for testing.
func NewRouteNamespaces ¶
func NewRouteNamespaces() *RouteNamespacesBuilder
func (*RouteNamespacesBuilder) Build ¶
func (b *RouteNamespacesBuilder) Build() *gatewayapi.RouteNamespaces
Build returns the configured RouteNamespaces.
func (*RouteNamespacesBuilder) FromAll ¶
func (b *RouteNamespacesBuilder) FromAll() *RouteNamespacesBuilder
func (*RouteNamespacesBuilder) FromSame ¶
func (b *RouteNamespacesBuilder) FromSame() *RouteNamespacesBuilder
func (*RouteNamespacesBuilder) FromSelector ¶
func (b *RouteNamespacesBuilder) FromSelector(s *metav1.LabelSelector) *RouteNamespacesBuilder
type ServicePortBuilder ¶
type ServicePortBuilder struct {
// contains filtered or unexported fields
}
ServicePortBuilder is a builder for core v1 ServicePort. Primarily used for testing.
func NewServicePort ¶
func NewServicePort() *ServicePortBuilder
func (*ServicePortBuilder) Build ¶
func (b *ServicePortBuilder) Build() corev1.ServicePort
Build returns the configured ServicePort.
func (*ServicePortBuilder) IntoSlice ¶
func (b *ServicePortBuilder) IntoSlice() []corev1.ServicePort
IntoSlice returns the configured ServicePort in a slice.
func (*ServicePortBuilder) WithAppProtocol ¶
func (b *ServicePortBuilder) WithAppProtocol(appproto string) *ServicePortBuilder
WithAppProtocol sets the app protocol on the service port.
func (*ServicePortBuilder) WithName ¶
func (b *ServicePortBuilder) WithName(name string) *ServicePortBuilder
WithName sets the name on the service port.
func (*ServicePortBuilder) WithNodePort ¶
func (b *ServicePortBuilder) WithNodePort(port int32) *ServicePortBuilder
WithNodePort sets the target port on the service port.
func (*ServicePortBuilder) WithPort ¶
func (b *ServicePortBuilder) WithPort(port int32) *ServicePortBuilder
WithPort sets the port on the service port.
func (*ServicePortBuilder) WithProtocol ¶
func (b *ServicePortBuilder) WithProtocol(proto corev1.Protocol) *ServicePortBuilder
WithProtocol sets the protocol on the service port.
func (*ServicePortBuilder) WithTargetPort ¶
func (b *ServicePortBuilder) WithTargetPort(targetport intstr.IntOrString) *ServicePortBuilder
WithTargetPort sets the target port on the service port.