v1alpha1

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=samples.knative.dev

Index

Constants

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

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

	// SampleConditionDeployed has status True when the SampleSource has had it's deployment created.
	SampleConditionDeployed apis.ConditionType = "Deployed"
)
View Source
const (
	// SampleSourceConditionReady is set when the revision is starting to materialize
	// runtime resources, and becomes true when those resources are ready.
	SampleSourceConditionReady = apis.ConditionReady
)

Variables

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

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 Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type SampleSource

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

	// Spec holds the desired state of the SampleSource (from the client).
	Spec SampleSourceSpec `json:"spec"`

	// Status communicates the observed state of the SampleSource (from the controller).
	// +optional
	Status SampleSourceStatus `json:"status,omitempty"`
}

+genclient +genreconciler +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*SampleSource) DeepCopy

func (in *SampleSource) DeepCopy() *SampleSource

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

func (*SampleSource) DeepCopyInto

func (in *SampleSource) DeepCopyInto(out *SampleSource)

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

func (*SampleSource) DeepCopyObject

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

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

func (*SampleSource) GetConditionSet

func (*SampleSource) GetConditionSet() apis.ConditionSet

GetConditionSet returns SampleSource ConditionSet.

func (*SampleSource) GetGroupVersionKind

func (*SampleSource) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns the GroupVersionKind.

func (*SampleSource) GetStatus

func (ss *SampleSource) GetStatus() *duckv1.Status

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

func (*SampleSource) SetDefaults

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

SetDefaults mutates SampleSource.

func (*SampleSource) Validate

func (s *SampleSource) Validate(ctx context.Context) *apis.FieldError

Validate validates SampleSource.

type SampleSourceList

type SampleSourceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []SampleSource `json:"items"`
}

SampleSourceList is a list of SampleSource resources

func (*SampleSourceList) DeepCopy

func (in *SampleSourceList) DeepCopy() *SampleSourceList

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

func (*SampleSourceList) DeepCopyInto

func (in *SampleSourceList) DeepCopyInto(out *SampleSourceList)

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

func (*SampleSourceList) DeepCopyObject

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

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

type SampleSourceSpec

type SampleSourceSpec 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"`

	// ServiceAccountName holds the name of the Kubernetes service account
	// as which the underlying K8s resources should be run. If unspecified
	// this will default to the "default" service account for the namespace
	// in which the SampleSource exists.
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// Interval is the time interval between events.
	//
	// The string format is a sequence of decimal numbers, each with optional
	// fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time
	// units are "ns", "us" (or "µs"), "ms", "s", "m", "h". If unspecified
	// this will default to "10s".
	Interval string `json:"interval"`
}

SampleSourceSpec holds the desired state of the SampleSource (from the client).

func (*SampleSourceSpec) DeepCopy

func (in *SampleSourceSpec) DeepCopy() *SampleSourceSpec

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

func (*SampleSourceSpec) DeepCopyInto

func (in *SampleSourceSpec) DeepCopyInto(out *SampleSourceSpec)

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

func (*SampleSourceSpec) Validate

func (sspec *SampleSourceSpec) Validate(ctx context.Context) *apis.FieldError

Validate validates SampleSourceSpec.

type SampleSourceStatus

type SampleSourceStatus 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"`
}

SampleSourceStatus communicates the observed state of the SampleSource (from the controller).

func (*SampleSourceStatus) DeepCopy

func (in *SampleSourceStatus) DeepCopy() *SampleSourceStatus

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

func (*SampleSourceStatus) DeepCopyInto

func (in *SampleSourceStatus) DeepCopyInto(out *SampleSourceStatus)

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

func (*SampleSourceStatus) GetCondition

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

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

func (*SampleSourceStatus) InitializeConditions

func (s *SampleSourceStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*SampleSourceStatus) IsReady

func (s *SampleSourceStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*SampleSourceStatus) MarkNoSink

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

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

func (*SampleSourceStatus) MarkSink

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

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

func (*SampleSourceStatus) PropagateDeploymentAvailability

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

PropagateDeploymentAvailability uses the availability of the provided Deployment to determine if SampleConditionDeployed 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