v1beta2

package
Version: v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: Apache-2.0 Imports: 19 Imported by: 8

Documentation

Overview

Package v1beta2 contains API Schema definitions for the sources v1beta2 API group. +k8s:deepcopy-gen=package +groupName=sources.knative.dev

Index

Constants

View Source
const (
	// PingSourceConditionReady has status True when the PingSource is ready to send events.
	PingSourceConditionReady = apis.ConditionReady

	// PingSourceConditionSinkProvided has status True when the PingSource has been configured with a sink target.
	PingSourceConditionSinkProvided apis.ConditionType = "SinkProvided"

	// PingSourceConditionDeployed has status True when the PingSource has had it's receive adapter deployment created.
	PingSourceConditionDeployed apis.ConditionType = "Deployed"
)
View Source
const (
	// PingSourceEventType is the default PingSource CloudEvent type.
	PingSourceEventType = "dev.knative.sources.ping"
)

Variables

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

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 PingSourceSource

func PingSourceSource(namespace, name string) string

PingSourceSource returns the PingSource CloudEvent source.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type PingSource

type PingSource struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PingSourceSpec   `json:"spec,omitempty"`
	Status PingSourceStatus `json:"status,omitempty"`
}

PingSource is the Schema for the PingSources API.

func (*PingSource) ConvertFrom

func (sink *PingSource) ConvertFrom(ctx context.Context, obj apis.Convertible) error

ConvertFrom implements apis.Convertible Converts source from a higher version into v1beta2.PingSource

func (*PingSource) ConvertTo

func (source *PingSource) ConvertTo(ctx context.Context, obj apis.Convertible) error

ConvertTo implements apis.Convertible Converts source from v1beta2.PingSource into a higher version.

func (*PingSource) DeepCopy

func (in *PingSource) DeepCopy() *PingSource

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

func (*PingSource) DeepCopyInto

func (in *PingSource) DeepCopyInto(out *PingSource)

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

func (*PingSource) DeepCopyObject

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

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

func (*PingSource) GetConditionSet

func (*PingSource) GetConditionSet() apis.ConditionSet

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

func (*PingSource) GetGroupVersionKind

func (s *PingSource) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns the GroupVersionKind.

func (*PingSource) GetStatus

func (p *PingSource) GetStatus() *duckv1.Status

GetStatus retrieves the status of the PingSource. Implements the KRShaped interface.

func (*PingSource) GetUntypedSpec

func (s *PingSource) GetUntypedSpec() interface{}

GetUntypedSpec returns the spec of the PingSource.

func (*PingSource) SetDefaults

func (s *PingSource) SetDefaults(ctx context.Context)

func (*PingSource) Validate

func (c *PingSource) Validate(ctx context.Context) *apis.FieldError

type PingSourceList

type PingSourceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PingSource `json:"items"`
}

PingSourceList contains a list of PingSources.

func (*PingSourceList) DeepCopy

func (in *PingSourceList) DeepCopy() *PingSourceList

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

func (*PingSourceList) DeepCopyInto

func (in *PingSourceList) DeepCopyInto(out *PingSourceList)

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

func (*PingSourceList) DeepCopyObject

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

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

type PingSourceSpec

type PingSourceSpec struct {
	// inherits duck/v1 SourceSpec, which currently provides:
	// * Sink - a reference to an object that will resolve to a domain name or
	//   a URI directly to use as the sink.
	// * CloudEventOverrides - defines overrides to control the output format
	//   and modifications of the event sent to the sink.
	duckv1.SourceSpec `json:",inline"`

	// Schedule is the cron schedule. Defaults to `* * * * *`.
	// +optional
	Schedule string `json:"schedule,omitempty"`

	// Timezone modifies the actual time relative to the specified timezone.
	// Defaults to the system time zone.
	// More general information about time zones: https://www.iana.org/time-zones
	// List of valid timezone values: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
	Timezone string `json:"timezone,omitempty"`

	// ContentType is the media type of Data or DataBase64. Default is empty.
	// +optional
	ContentType string `json:"contentType,omitempty"`

	// Data is data used as the body of the event posted to the sink. Default is empty.
	// Mutually exclusive with DataBase64.
	// +optional
	Data string `json:"data,omitempty"`

	// DataBase64 is the base64-encoded string of the actual event's body posted to the sink. Default is empty.
	// Mutually exclusive with Data.
	// +optional
	DataBase64 string `json:"dataBase64,omitempty"`
}

PingSourceSpec defines the desired state of the PingSource.

func (*PingSourceSpec) DeepCopy

func (in *PingSourceSpec) DeepCopy() *PingSourceSpec

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

func (*PingSourceSpec) DeepCopyInto

func (in *PingSourceSpec) DeepCopyInto(out *PingSourceSpec)

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

func (*PingSourceSpec) SetDefaults

func (ss *PingSourceSpec) SetDefaults(ctx context.Context)

func (*PingSourceSpec) Validate

func (cs *PingSourceSpec) Validate(ctx context.Context) *apis.FieldError

type PingSourceStatus

type PingSourceStatus struct {
	// inherits duck/v1 SourceStatus, 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.
	// * SinkURI - the current active sink URI that has been configured for the
	//   Source.
	duckv1.SourceStatus `json:",inline"`
}

PingSourceStatus defines the observed state of PingSource.

func (*PingSourceStatus) DeepCopy

func (in *PingSourceStatus) DeepCopy() *PingSourceStatus

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

func (*PingSourceStatus) DeepCopyInto

func (in *PingSourceStatus) DeepCopyInto(out *PingSourceStatus)

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

func (*PingSourceStatus) GetCondition

func (s *PingSourceStatus) GetCondition(t apis.ConditionType) *apis.Condition

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

func (*PingSourceStatus) GetTopLevelCondition

func (ps *PingSourceStatus) GetTopLevelCondition() *apis.Condition

GetTopLevelCondition returns the top level Condition.

func (*PingSourceStatus) InitializeConditions

func (s *PingSourceStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*PingSourceStatus) IsReady

func (s *PingSourceStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*PingSourceStatus) MarkNoSink

func (s *PingSourceStatus) MarkNoSink(reason, messageFormat string, messageA ...interface{})

MarkNoSink sets the condition that the source does not have a sink configured.

func (*PingSourceStatus) MarkSink

func (s *PingSourceStatus) MarkSink(uri *apis.URL)

MarkSink sets the condition that the source has a sink configured.

func (*PingSourceStatus) PropagateDeploymentAvailability

func (s *PingSourceStatus) PropagateDeploymentAvailability(d *appsv1.Deployment)

PropagateDeploymentAvailability uses the availability of the provided Deployment to determine if PingSourceConditionDeployed should be marked as true or false.

Jump to

Keyboard shortcuts

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