Documentation ¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API. +k8s:deepcopy-gen=package +groupName=kafka.eventing.knative.dev
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func RegisterAlternateResetOffsetConditionSet(conditionSet apis.ConditionSet)
- func Resource(resource string) schema.GroupResource
- type OffsetMapping
- type OffsetSpec
- type ResetOffset
- func (in *ResetOffset) DeepCopy() *ResetOffset
- func (in *ResetOffset) DeepCopyInto(out *ResetOffset)
- func (in *ResetOffset) DeepCopyObject() runtime.Object
- func (*ResetOffset) GetConditionSet() apis.ConditionSet
- func (ro *ResetOffset) GetGroupVersionKind() schema.GroupVersionKind
- func (ro *ResetOffset) GetStatus() *duckv1.Status
- func (ro *ResetOffset) SetDefaults(ctx context.Context)
- func (ro *ResetOffset) Validate(ctx context.Context) *apis.FieldError
- type ResetOffsetList
- type ResetOffsetSpec
- func (in *ResetOffsetSpec) DeepCopy() *ResetOffsetSpec
- func (in *ResetOffsetSpec) DeepCopyInto(out *ResetOffsetSpec)
- func (ros *ResetOffsetSpec) IsOffsetEarliest() bool
- func (ros *ResetOffsetSpec) IsOffsetLatest() bool
- func (ros *ResetOffsetSpec) ParseOffsetTime() (time.Time, error)
- func (ros *ResetOffsetSpec) ParseSaramaOffsetTime() (int64, error)
- func (ros *ResetOffsetSpec) SetDefaults(_ context.Context)
- func (ros *ResetOffsetSpec) Validate(ctx context.Context) *apis.FieldError
- type ResetOffsetStatus
- func (in *ResetOffsetStatus) DeepCopy() *ResetOffsetStatus
- func (in *ResetOffsetStatus) DeepCopyInto(out *ResetOffsetStatus)
- func (ros *ResetOffsetStatus) GetCondition(t apis.ConditionType) *apis.Condition
- func (*ResetOffsetStatus) GetConditionSet() apis.ConditionSet
- func (ros *ResetOffsetStatus) GetGroup() string
- func (ros *ResetOffsetStatus) GetPartitions() []OffsetMapping
- func (ros *ResetOffsetStatus) GetTopic() string
- func (ros *ResetOffsetStatus) InitializeConditions()
- func (ros *ResetOffsetStatus) IsOffsetsUpdated() bool
- func (ros *ResetOffsetStatus) IsSucceeded() bool
- func (ros *ResetOffsetStatus) MarkAcquireDataPlaneServicesFailed(reason, messageFormat string, messageA ...interface{})
- func (ros *ResetOffsetStatus) MarkAcquireDataPlaneServicesTrue()
- func (ros *ResetOffsetStatus) MarkConsumerGroupsStartedFailed(reason, messageFormat string, messageA ...interface{})
- func (ros *ResetOffsetStatus) MarkConsumerGroupsStartedTrue()
- func (ros *ResetOffsetStatus) MarkConsumerGroupsStoppedFailed(reason, messageFormat string, messageA ...interface{})
- func (ros *ResetOffsetStatus) MarkConsumerGroupsStoppedTrue()
- func (ros *ResetOffsetStatus) MarkOffsetsUpdatedFailed(reason, messageFormat string, messageA ...interface{})
- func (ros *ResetOffsetStatus) MarkOffsetsUpdatedTrue()
- func (ros *ResetOffsetStatus) MarkRefMappedFailed(reason, messageFormat string, messageA ...interface{})
- func (ros *ResetOffsetStatus) MarkRefMappedTrue()
- func (ros *ResetOffsetStatus) SetGroup(group string)
- func (ros *ResetOffsetStatus) SetPartitions(offsetMappings []OffsetMapping)
- func (ros *ResetOffsetStatus) SetTopic(topic string)
Constants ¶
const ( // ResetOffsetConditionSucceeded has status True when all sub-conditions below have been set to True. ResetOffsetConditionSucceeded = apis.ConditionSucceeded // ResetOffsetConditionRefMapped has status True when the ResetOffset.Spec.Ref has been // successfully mapped to the corresponding Kafka Topic name and ConsumerGroup ID. These // values will then be populated in the the ResetOffsetStatus. ResetOffsetConditionRefMapped apis.ConditionType = "RefMapped" // ResetOffsetConditionAcquireDataPlaneServices has status True if the most recent attempt to // reconcile the control-protocol DataPlane Services from the ConnectionPool was successful. ResetOffsetConditionAcquireDataPlaneServices apis.ConditionType = "AcquireDataPlaneServices" // ResetOffsetConditionConsumerGroupsStopped has status True when all of the ConsumerGroups // associated with the referenced object (Subscription, Trigger, etc.) have been stopped. ResetOffsetConditionConsumerGroupsStopped apis.ConditionType = "ConsumerGroupsStopped" // ResetOffsetConditionOffsetsUpdated has status True when all of the individual offsets // of each Partition in the Topic have been updated to their new values. ResetOffsetConditionOffsetsUpdated apis.ConditionType = "OffsetsUpdated" // ResetOffsetConditionConsumerGroupsStarted has status True when all of the ConsumerGroups // associated with the referenced object (Subscription, Trigger, etc.) have been restarted. ResetOffsetConditionConsumerGroupsStarted apis.ConditionType = "ConsumerGroupsStarted" )
const ( OffsetEarliest = "earliest" OffsetLatest = "latest" )
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: kafka.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func RegisterAlternateResetOffsetConditionSet ¶
func RegisterAlternateResetOffsetConditionSet(conditionSet apis.ConditionSet)
RegisterAlternateResetOffsetConditionSet 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 OffsetMapping ¶
type OffsetMapping struct { Partition int32 `json:"partition"` OldOffset int64 `json:"oldOffset"` NewOffset int64 `json:"newOffset"` }
OffsetMapping represents a single Kafka Partition's Offset values before and after repositioning.
func (*OffsetMapping) DeepCopy ¶
func (in *OffsetMapping) DeepCopy() *OffsetMapping
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OffsetMapping.
func (*OffsetMapping) DeepCopyInto ¶
func (in *OffsetMapping) DeepCopyInto(out *OffsetMapping)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OffsetSpec ¶
type OffsetSpec struct { // Time is an string representing the desired offset position to which all partitions // will be reset. Supported values include "earliest", "latest", or a valid date / time // string in the time.RFC3339 format. The "earliest" and "latest" values indicate the // beginning and end, respectively, of the persistence window of the Topic. There is no // default value, and invalid values will result in the ResetOffset operation being // rejected as failed. Time string `json:"time"` }
OffsetSpec defines the intended values to move the offsets to. Note: This simple wrapper might seem unnecessary, but is provided to allow future extension
in order to support specifying explicit offset (int64) values for each Partition.
func (*OffsetSpec) DeepCopy ¶
func (in *OffsetSpec) DeepCopy() *OffsetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OffsetSpec.
func (*OffsetSpec) DeepCopyInto ¶
func (in *OffsetSpec) DeepCopyInto(out *OffsetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResetOffset ¶
type ResetOffset struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired state of the ResetOffset. Spec ResetOffsetSpec `json:"spec,omitempty"` // Status represents the current state of the ResetOffset. // This data may be out of date. // +optional Status ResetOffsetStatus `json:"status,omitempty"` }
ResetOffset is a resource representing a "command" for re-positioning the offsets of a specific Kafka resource (Subscription, Trigger, etc.)
func (*ResetOffset) DeepCopy ¶
func (in *ResetOffset) DeepCopy() *ResetOffset
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResetOffset.
func (*ResetOffset) DeepCopyInto ¶
func (in *ResetOffset) DeepCopyInto(out *ResetOffset)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResetOffset) DeepCopyObject ¶
func (in *ResetOffset) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ResetOffset) GetConditionSet ¶
func (*ResetOffset) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*ResetOffset) GetGroupVersionKind ¶
func (ro *ResetOffset) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns GroupVersionKind for ResetOffset
func (*ResetOffset) GetStatus ¶
func (ro *ResetOffset) GetStatus() *duckv1.Status
GetStatus retrieves the duck status for this resource. Implements the KRShaped interface.
func (*ResetOffset) SetDefaults ¶
func (ro *ResetOffset) SetDefaults(ctx context.Context)
func (*ResetOffset) Validate ¶
func (ro *ResetOffset) Validate(ctx context.Context) *apis.FieldError
Validate verifies the ResetOffset and returns errors for any invalid fields.
type ResetOffsetList ¶
type ResetOffsetList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `json:"metadata,omitempty"` Items []ResetOffset `json:"items"` }
ResetOffsetList is a collection of ResetOffsets.
func (*ResetOffsetList) DeepCopy ¶
func (in *ResetOffsetList) DeepCopy() *ResetOffsetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResetOffsetList.
func (*ResetOffsetList) DeepCopyInto ¶
func (in *ResetOffsetList) DeepCopyInto(out *ResetOffsetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResetOffsetList) DeepCopyObject ¶
func (in *ResetOffsetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResetOffsetSpec ¶
type ResetOffsetSpec struct { // Offset is an object representing the desired offset position to which all partitions // will be reset. It provides for future extensibility in supporting various types of // offset information (time based, explicit offset numbers, etc.) Offset OffsetSpec `json:"offset"` // Ref is a KReference specifying the Knative resource, related to a Kafka ConsumerGroup, // whose partitions offsets will be reset (e.g. Subscription, Trigger, etc.) The referenced // object MUST be related to a Kafka Topic in such a way that it's specific partitions // can be identified. Thus, even though the KReference is a wide-open type, it is up // to the user to provide an appropriate value as supported by the Controller in question // (KafkaChannel vs KafkaBroker, etc). Failure to provide a valid value will result in // the ResetOffset operation being rejected as failed. Ref duckv1.KReference `json:"ref"` }
ResetOffsetSpec defines the specification for a ResetOffset.
func (*ResetOffsetSpec) DeepCopy ¶
func (in *ResetOffsetSpec) DeepCopy() *ResetOffsetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResetOffsetSpec.
func (*ResetOffsetSpec) DeepCopyInto ¶
func (in *ResetOffsetSpec) DeepCopyInto(out *ResetOffsetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResetOffsetSpec) IsOffsetEarliest ¶
func (ros *ResetOffsetSpec) IsOffsetEarliest() bool
IsOffsetEarliest returns True if the Offset value is "earliest"
func (*ResetOffsetSpec) IsOffsetLatest ¶
func (ros *ResetOffsetSpec) IsOffsetLatest() bool
IsOffsetLatest returns True if the Offset value is "latest"
func (*ResetOffsetSpec) ParseOffsetTime ¶
func (ros *ResetOffsetSpec) ParseOffsetTime() (time.Time, error)
ParseOffsetTime returns the parsed Offset Time if valid (RFC3339 format) or an error for invalid content.
func (*ResetOffsetSpec) ParseSaramaOffsetTime ¶
func (ros *ResetOffsetSpec) ParseSaramaOffsetTime() (int64, error)
ParseSaramaOffsetTime returns the Sarama Offset Time (millis since epoch) int64 as parsed from the specified ResetOffset.Spec
func (*ResetOffsetSpec) SetDefaults ¶
func (ros *ResetOffsetSpec) SetDefaults(_ context.Context)
func (*ResetOffsetSpec) Validate ¶
func (ros *ResetOffsetSpec) Validate(ctx context.Context) *apis.FieldError
Validate verifies the ResetOffsetSpec and returns errors for an invalid fields.
type ResetOffsetStatus ¶
type ResetOffsetStatus struct { // Topic is a string representing the Kafka Topic name associated with the ResetOffsetSpec.Ref // +optional Topic string `json:"topic,omitempty"` // Group is a string representing the Kafka ConsumerGroup ID associated with the ResetOffsetSpec.Ref // +optional Group string `json:"group,omitempty"` // Partitions is an array of OffsetMapping structs which represent the Offsets (old / new) of // all Kafka Partitions associated with the ResetOffsetSpec.Ref // +optional Partitions []OffsetMapping `json:"partitions,omitempty"` // inherits duck/v1 Status, which currently provides: // * ObservedGeneration - the 'Generation' of the Service that was last processed by the controller. // * Conditions - the latest available observations of a resource's current state. // * Annotations - optional status information to be conveyed to users. duckv1.Status `json:",inline"` }
ResetOffsetStatus represents the current state of a ResetOffset.
func (*ResetOffsetStatus) DeepCopy ¶
func (in *ResetOffsetStatus) DeepCopy() *ResetOffsetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResetOffsetStatus.
func (*ResetOffsetStatus) DeepCopyInto ¶
func (in *ResetOffsetStatus) DeepCopyInto(out *ResetOffsetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResetOffsetStatus) GetCondition ¶
func (ros *ResetOffsetStatus) GetCondition(t apis.ConditionType) *apis.Condition
GetCondition returns the condition currently associated with the given type, or nil.
func (*ResetOffsetStatus) GetConditionSet ¶
func (*ResetOffsetStatus) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource.
func (*ResetOffsetStatus) GetGroup ¶
func (ros *ResetOffsetStatus) GetGroup() string
func (*ResetOffsetStatus) GetPartitions ¶
func (ros *ResetOffsetStatus) GetPartitions() []OffsetMapping
func (*ResetOffsetStatus) GetTopic ¶
func (ros *ResetOffsetStatus) GetTopic() string
func (*ResetOffsetStatus) InitializeConditions ¶
func (ros *ResetOffsetStatus) InitializeConditions()
InitializeConditions sets relevant unset conditions to Unknown state.
func (*ResetOffsetStatus) IsOffsetsUpdated ¶ added in v0.24.0
func (ros *ResetOffsetStatus) IsOffsetsUpdated() bool
IsOffsetsUpdated returns true if the ResetOffsetConditionOffsetsUpdates status is true.
func (*ResetOffsetStatus) IsSucceeded ¶ added in v0.24.0
func (ros *ResetOffsetStatus) IsSucceeded() bool
IsSucceeded returns true if the ResetOffsetConditionSucceeded status is true.
func (*ResetOffsetStatus) MarkAcquireDataPlaneServicesFailed ¶ added in v0.24.0
func (ros *ResetOffsetStatus) MarkAcquireDataPlaneServicesFailed(reason, messageFormat string, messageA ...interface{})
func (*ResetOffsetStatus) MarkAcquireDataPlaneServicesTrue ¶ added in v0.24.0
func (ros *ResetOffsetStatus) MarkAcquireDataPlaneServicesTrue()
func (*ResetOffsetStatus) MarkConsumerGroupsStartedFailed ¶
func (ros *ResetOffsetStatus) MarkConsumerGroupsStartedFailed(reason, messageFormat string, messageA ...interface{})
func (*ResetOffsetStatus) MarkConsumerGroupsStartedTrue ¶
func (ros *ResetOffsetStatus) MarkConsumerGroupsStartedTrue()
func (*ResetOffsetStatus) MarkConsumerGroupsStoppedFailed ¶
func (ros *ResetOffsetStatus) MarkConsumerGroupsStoppedFailed(reason, messageFormat string, messageA ...interface{})
func (*ResetOffsetStatus) MarkConsumerGroupsStoppedTrue ¶
func (ros *ResetOffsetStatus) MarkConsumerGroupsStoppedTrue()
func (*ResetOffsetStatus) MarkOffsetsUpdatedFailed ¶
func (ros *ResetOffsetStatus) MarkOffsetsUpdatedFailed(reason, messageFormat string, messageA ...interface{})
func (*ResetOffsetStatus) MarkOffsetsUpdatedTrue ¶
func (ros *ResetOffsetStatus) MarkOffsetsUpdatedTrue()
func (*ResetOffsetStatus) MarkRefMappedFailed ¶ added in v0.24.0
func (ros *ResetOffsetStatus) MarkRefMappedFailed(reason, messageFormat string, messageA ...interface{})
func (*ResetOffsetStatus) MarkRefMappedTrue ¶ added in v0.24.0
func (ros *ResetOffsetStatus) MarkRefMappedTrue()
func (*ResetOffsetStatus) SetGroup ¶
func (ros *ResetOffsetStatus) SetGroup(group string)
func (*ResetOffsetStatus) SetPartitions ¶
func (ros *ResetOffsetStatus) SetPartitions(offsetMappings []OffsetMapping)
func (*ResetOffsetStatus) SetTopic ¶
func (ros *ResetOffsetStatus) SetTopic(topic string)