Documentation ¶
Overview ¶
Package object contains utilities for creating and comparing API objects.
Index ¶
- Variables
- func ApplyExistingChannelAttributes(src, dst *messagingv1alpha1.Channel)
- func ApplyExistingServiceAttributes(src, dst *servingv1alpha1.Service)
- func NewChannel(ns, name string, opts ...ObjectOption) *messagingv1alpha1.Channel
- func NewService(ns, name string, opts ...ObjectOption) *servingv1alpha1.Service
- type ObjectOption
- func WithControllerRef(or *metav1.OwnerReference) ObjectOption
- func WithEnvVar(name, val string) ObjectOption
- func WithImage(img string) ObjectOption
- func WithLabel(key, val string) ObjectOption
- func WithMinScale(replicas int) ObjectOption
- func WithPodLabel(key, val string) ObjectOption
- func WithPort(port int32) ObjectOption
- func WithProbe(path string) ObjectOption
Constants ¶
This section is empty.
Variables ¶
var Semantic = conversion.EqualitiesOrDie(
channelEqual,
ksvcEqual,
)
Semantic can do semantic deep equality checks for API objects. Fields which are not relevant for the reconciliation logic are intentionally omitted.
Functions ¶
func ApplyExistingChannelAttributes ¶
func ApplyExistingChannelAttributes(src, dst *messagingv1alpha1.Channel)
ApplyExistingChannelAttributes copies some important attributes from a given source Channel to a destination Channel.
func ApplyExistingServiceAttributes ¶
func ApplyExistingServiceAttributes(src, dst *servingv1alpha1.Service)
ApplyExistingServiceAttributes copies some important attributes from a given source Service to a destination Service.
func NewChannel ¶
func NewChannel(ns, name string, opts ...ObjectOption) *messagingv1alpha1.Channel
NewChannel creates a Channel object.
func NewService ¶
func NewService(ns, name string, opts ...ObjectOption) *servingv1alpha1.Service
NewService creates a Service object.
Types ¶
type ObjectOption ¶
ObjectOption is a functional option for API objects builders.
func WithControllerRef ¶
func WithControllerRef(or *metav1.OwnerReference) ObjectOption
WithControllerRef sets the controller reference of an API object.
func WithEnvVar ¶
func WithEnvVar(name, val string) ObjectOption
WithEnvVar sets the value of a container env var.
func WithImage ¶
func WithImage(img string) ObjectOption
WithImage sets the container image of a Service.
func WithLabel ¶
func WithLabel(key, val string) ObjectOption
WithLabel sets the value of an API object's label.
func WithMinScale ¶
func WithMinScale(replicas int) ObjectOption
WithMinScale specifies the minimum number of Pods this Service should have at any given time.
func WithPodLabel ¶
func WithPodLabel(key, val string) ObjectOption
WithPodLabel sets a label on a Service's template
func WithPort ¶
func WithPort(port int32) ObjectOption
WithPort sets the container port of a Service.
func WithProbe ¶
func WithProbe(path string) ObjectOption
WithProbe sets the HTTP readiness probe of a container.