v1beta1

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Overview

Package v1beta1 is the v1beta1 version of the API. +k8s:deepcopy-gen=package +groupName=messaging.knative.dev

Index

Constants

View Source
const (
	// DefaultNumPartitions is the KafkaChannel Spec default for the number of partitions
	DefaultNumPartitions = 1

	// DefaultReplicationFactor is the KafkaChannel Spec default for the replication factor
	DefaultReplicationFactor = 1

	// DefaultRetentionISO8601Duration is the KafkaChannel Spec default for the retention duration as an ISO-8601 string
	DefaultRetentionISO8601Duration = "PT168H" // Precise 7 Days

	// DefaultRetentionDuration is the time.Duration equivalent of the DefaultRetentionISO8601Duration
	DefaultRetentionDuration = 7 * 24 * time.Hour // Precise 7 Days

	// KafkaTopicConfigRetentionMs is the key in the Sarama TopicDetail ConfigEntries map for retention time (in ms)
	KafkaTopicConfigRetentionMs = "retention.ms"
)
View Source
const (

	// KafkaChannelConditionReady has status True when all sub-conditions below have been set to True.
	KafkaChannelConditionReady = apis.ConditionReady

	// KafkaChannelConditionAddressable has status true when this KafkaChannel meets
	// the Addressable contract and has a non-empty URL.
	KafkaChannelConditionAddressable apis.ConditionType = "Addressable"

	// KafkaChannelConditionConfigReady has status True when the Kafka configuration to use by the channel
	// exists and is valid (i.e. the connection has been established).
	KafkaChannelConditionConfigReady apis.ConditionType = "ConfigurationReady"

	// KafkaChannelConditionTopicReady has status True when the Kafka topic to use by the channel exists.
	KafkaChannelConditionTopicReady apis.ConditionType = "TopicReady"

	// KafkaChannelConditionChannelServiceReady has status True when the K8S Service representing the channel
	// is ready. Because this uses ExternalName, there are no endpoints to check.
	KafkaChannelConditionChannelServiceReady apis.ConditionType = "ChannelServiceReady"
)

Shared / Common Conditions Used By All Channel Implementations

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: messaging.GroupName, Version: "v1beta1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func RegisterAlternateKafkaChannelConditionSet

func RegisterAlternateKafkaChannelConditionSet(conditionSet apis.ConditionSet)

RegisterAlternateKafkaChannelConditionSet register a different apis.ConditionSet.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type KafkaChannel

type KafkaChannel struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the desired state of the Channel.
	Spec KafkaChannelSpec `json:"spec,omitempty"`

	// Status represents the current state of the KafkaChannel. This data may be out of
	// date.
	// +optional
	Status KafkaChannelStatus `json:"status,omitempty"`
}

KafkaChannel is a resource representing a Kafka Channel.

func (*KafkaChannel) CheckImmutableFields

func (kc *KafkaChannel) CheckImmutableFields(_ context.Context, original *KafkaChannel) *apis.FieldError

func (*KafkaChannel) ConvertFrom

func (sink *KafkaChannel) ConvertFrom(_ context.Context, channel apis.Convertible) error

ConvertFrom implements apis.Convertible

func (*KafkaChannel) ConvertTo

func (channel *KafkaChannel) ConvertTo(_ context.Context, sink apis.Convertible) error

ConvertTo implements apis.Convertible

func (*KafkaChannel) DeepCopy

func (in *KafkaChannel) DeepCopy() *KafkaChannel

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KafkaChannel.

func (*KafkaChannel) DeepCopyInto

func (in *KafkaChannel) DeepCopyInto(out *KafkaChannel)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KafkaChannel) DeepCopyObject

func (in *KafkaChannel) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*KafkaChannel) GetConditionSet

func (*KafkaChannel) GetConditionSet() apis.ConditionSet

GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.

func (*KafkaChannel) GetGroupVersionKind

func (kc *KafkaChannel) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns GroupVersionKind for KafkaChannels

func (*KafkaChannel) GetStatus

func (kc *KafkaChannel) GetStatus() *duckv1.Status

GetStatus retrieves the duck status for this resource. Implements the KRShaped interface.

func (*KafkaChannel) SetDefaults

func (kc *KafkaChannel) SetDefaults(ctx context.Context)

func (*KafkaChannel) Validate

func (kc *KafkaChannel) Validate(ctx context.Context) *apis.FieldError

type KafkaChannelList

type KafkaChannelList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []KafkaChannel `json:"items"`
}

KafkaChannelList is a collection of KafkaChannels.

func (*KafkaChannelList) DeepCopy

func (in *KafkaChannelList) DeepCopy() *KafkaChannelList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KafkaChannelList.

func (*KafkaChannelList) DeepCopyInto

func (in *KafkaChannelList) DeepCopyInto(out *KafkaChannelList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KafkaChannelList) DeepCopyObject

func (in *KafkaChannelList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KafkaChannelSpec

type KafkaChannelSpec struct {
	// NumPartitions is the number of partitions of a Kafka topic. By default, it is set to 1.
	NumPartitions int32 `json:"numPartitions"`

	// ReplicationFactor is the replication factor of a Kafka topic. By default, it is set to 1.
	ReplicationFactor int16 `json:"replicationFactor"`

	// RetentionDuration is the duration for which events will be retained in the Kafka Topic.
	// By default, it is set to 168 hours, which is the precise form for 7 days.
	// More information on Duration format:
	//  - https://www.iso.org/iso-8601-date-and-time-format.html
	//  - https://en.wikipedia.org/wiki/ISO_8601
	RetentionDuration string `json:"retentionDuration"`

	// Channel conforms to Duck type Channelable.
	eventingduck.ChannelableSpec `json:",inline"`
}

KafkaChannelSpec defines the specification for a KafkaChannel.

func (*KafkaChannelSpec) DeepCopy

func (in *KafkaChannelSpec) DeepCopy() *KafkaChannelSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KafkaChannelSpec.

func (*KafkaChannelSpec) DeepCopyInto

func (in *KafkaChannelSpec) DeepCopyInto(out *KafkaChannelSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KafkaChannelSpec) ParseRetentionDuration

func (kcs *KafkaChannelSpec) ParseRetentionDuration() (time.Duration, error)

ParseRetentionDuration returns the parsed Offset Time if valid (RFC3339 format) or an error for invalid content. Note - If the optional RetentionDuration field is not present, or is invalid, a Duration of "-1" will be returned.

func (*KafkaChannelSpec) SetDefaults

func (kcs *KafkaChannelSpec) SetDefaults(ctx context.Context)

func (*KafkaChannelSpec) Validate

func (kcs *KafkaChannelSpec) Validate(ctx context.Context) *apis.FieldError

type KafkaChannelStatus

type KafkaChannelStatus struct {
	// Channel conforms to Duck type ChannelableStatus.
	eventingduck.ChannelableStatus `json:",inline"`
}

KafkaChannelStatus represents the current state of a KafkaChannel.

func (*KafkaChannelStatus) DeepCopy

func (in *KafkaChannelStatus) DeepCopy() *KafkaChannelStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KafkaChannelStatus.

func (*KafkaChannelStatus) DeepCopyInto

func (in *KafkaChannelStatus) DeepCopyInto(out *KafkaChannelStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KafkaChannelStatus) GetCondition

func (kcs *KafkaChannelStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition currently associated with the given type, or nil.

func (*KafkaChannelStatus) GetConditionSet

func (*KafkaChannelStatus) GetConditionSet() apis.ConditionSet

GetConditionSet retrieves the condition set for this resource.

func (*KafkaChannelStatus) InitializeConditions

func (kcs *KafkaChannelStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*KafkaChannelStatus) IsReady

func (kcs *KafkaChannelStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*KafkaChannelStatus) MarkChannelServiceFailed

func (kcs *KafkaChannelStatus) MarkChannelServiceFailed(reason, messageFormat string, messageA ...interface{})

func (*KafkaChannelStatus) MarkChannelServiceTrue

func (kcs *KafkaChannelStatus) MarkChannelServiceTrue()

func (*KafkaChannelStatus) MarkConfigFailed

func (kcs *KafkaChannelStatus) MarkConfigFailed(reason, messageFormat string, messageA ...interface{})

func (*KafkaChannelStatus) MarkConfigTrue

func (kcs *KafkaChannelStatus) MarkConfigTrue()

func (*KafkaChannelStatus) MarkTopicFailed

func (kcs *KafkaChannelStatus) MarkTopicFailed(reason, messageFormat string, messageA ...interface{})

func (*KafkaChannelStatus) MarkTopicTrue

func (kcs *KafkaChannelStatus) MarkTopicTrue()

func (*KafkaChannelStatus) SetAddress

func (kcs *KafkaChannelStatus) SetAddress(url *apis.URL)

SetAddress sets the address (as part of Addressable contract) and marks the correct condition.

Jump to

Keyboard shortcuts

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