v1alpha1

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/knative/eventing-contrib/pkg/apis/sources +k8s:defaulter-gen=TypeMeta +groupName=sources.eventing.knative.dev

Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/knative/eventing-contrib/pkg/apis/sources +k8s:defaulter-gen=TypeMeta +groupName=sources.eventing.knative.dev

Index

Constants

View Source
const (
	// GcpPubSubConditionReady has status True when the GcpPubSubSource is ready to send events.
	GcpPubSubConditionReady = duckv1alpha1.ConditionReady

	// GcpPubSubConditionSinkProvided has status True when the GcpPubSubSource has been configured with a sink target.
	GcpPubSubConditionSinkProvided duckv1alpha1.ConditionType = "SinkProvided"

	// GcpPubSubConditionTransformerProvided has status True when the GcpPubSubSource has been configured with a transformer target.
	GcpPubSubConditionTransformerProvided duckv1alpha1.ConditionType = "TransformerProvided"

	// GcpPubSubConditionDeployed has status True when the GcpPubSubSource has had it's receive adapter deployment created.
	GcpPubSubConditionDeployed duckv1alpha1.ConditionType = "Deployed"

	// GcpPubSubConditionSubscribed has status True when a GCP PubSub Subscription has been created pointing at the created receive adapter deployment.
	GcpPubSubConditionSubscribed duckv1alpha1.ConditionType = "Subscribed"

	// GcpPubSubConditionEventTypesProvided has status True when the GcpPubSubSource has been configured with event types.
	GcpPubSubConditionEventTypesProvided duckv1alpha1.ConditionType = "EventTypesProvided"
)
View Source
const (
	// GcpPubSubSourceEventType is the GcpPubSub CloudEvent type, in case PubSub doesn't send a
	// CloudEvent itself.
	GcpPubSubSourceEventType = "google.pubsub.topic.publish"
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "sources.eventing.knative.dev", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func GcpPubSubEventSource

func GcpPubSubEventSource(googleCloudProject, topic string) string

GcpPubSubEventSource returns the GcpPubSub CloudEvent source value.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type GcpPubSubSource

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

	Spec   GcpPubSubSourceSpec   `json:"spec,omitempty"`
	Status GcpPubSubSourceStatus `json:"status,omitempty"`
}

GcpPubSubSource is the Schema for the gcppubsubsources API. +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:categories=all,knative,eventing,sources

func (*GcpPubSubSource) CheckImmutableFields

func (current *GcpPubSubSource) CheckImmutableFields(ctx context.Context, og apis.Immutable) *apis.FieldError

func (*GcpPubSubSource) DeepCopy

func (in *GcpPubSubSource) DeepCopy() *GcpPubSubSource

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

func (*GcpPubSubSource) DeepCopyInto

func (in *GcpPubSubSource) DeepCopyInto(out *GcpPubSubSource)

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

func (*GcpPubSubSource) DeepCopyObject

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

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

type GcpPubSubSourceList

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

GcpPubSubSourceList contains a list of GcpPubSubSources.

func (*GcpPubSubSourceList) DeepCopy

func (in *GcpPubSubSourceList) DeepCopy() *GcpPubSubSourceList

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

func (*GcpPubSubSourceList) DeepCopyInto

func (in *GcpPubSubSourceList) DeepCopyInto(out *GcpPubSubSourceList)

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

func (*GcpPubSubSourceList) DeepCopyObject

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

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

type GcpPubSubSourceSpec

type GcpPubSubSourceSpec struct {
	// GcpCredsSecret is the credential to use to poll the GCP PubSub Subscription. It is not used
	// to create or delete the Subscription, only to poll it. The value of the secret entry must be
	// a service account key in the JSON format
	// ( see https://cloud.google.com/iam/docs/creating-managing-service-account-keys ).
	GcpCredsSecret corev1.SecretKeySelector `json:"gcpCredsSecret,omitempty"`

	// GoogleCloudProject is the ID of the Google Cloud Project that the PubSub Topic exists in.
	GoogleCloudProject string `json:"googleCloudProject,omitempty"`

	// Topic is the ID of the GCP PubSub Topic to Subscribe to. It must be in the form of the
	// unique identifier within the project, not the entire name. E.g. it must be 'laconia', not
	// 'projects/my-gcp-project/topics/laconia'.
	Topic string `json:"topic,omitempty"`

	// Sink is a reference to an object that will resolve to a domain name to use as the sink.
	// +optional
	Sink *corev1.ObjectReference `json:"sink,omitempty"`

	// Transformer is a reference to an object that will resolve to a domain name to use as the transformer.
	// +optional
	Transformer *corev1.ObjectReference `json:"transformer,omitempty"`

	// ServiceAccoutName is the name of the ServiceAccount that will be used to run the Receive
	// Adapter Deployment.
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
}

GcpPubSubSourceSpec defines the desired state of the GcpPubSubSource.

func (*GcpPubSubSourceSpec) DeepCopy

func (in *GcpPubSubSourceSpec) DeepCopy() *GcpPubSubSourceSpec

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

func (*GcpPubSubSourceSpec) DeepCopyInto

func (in *GcpPubSubSourceSpec) DeepCopyInto(out *GcpPubSubSourceSpec)

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

type GcpPubSubSourceStatus

type GcpPubSubSourceStatus struct {
	// inherits duck/v1alpha1 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.
	duckv1alpha1.Status `json:",inline"`

	// SinkURI is the current active sink URI that has been configured for the GcpPubSubSource.
	// +optional
	SinkURI string `json:"sinkUri,omitempty"`

	// TransformerURI is the current active transformer URI that has been configured for the GcpPubSubSource.
	// +optional
	TransformerURI string `json:"transformerUri,omitempty"`
}

GcpPubSubSourceStatus defines the observed state of GcpPubSubSource.

func (*GcpPubSubSourceStatus) DeepCopy

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

func (*GcpPubSubSourceStatus) DeepCopyInto

func (in *GcpPubSubSourceStatus) DeepCopyInto(out *GcpPubSubSourceStatus)

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

func (*GcpPubSubSourceStatus) GetCondition

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

func (*GcpPubSubSourceStatus) InitializeConditions

func (s *GcpPubSubSourceStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*GcpPubSubSourceStatus) IsReady

func (s *GcpPubSubSourceStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*GcpPubSubSourceStatus) MarkDeployed

func (s *GcpPubSubSourceStatus) MarkDeployed()

MarkDeployed sets the condition that the source has been deployed.

func (*GcpPubSubSourceStatus) MarkDeploying

func (s *GcpPubSubSourceStatus) MarkDeploying(reason, messageFormat string, messageA ...interface{})

MarkDeploying sets the condition that the source is deploying.

func (*GcpPubSubSourceStatus) MarkEventTypes

func (s *GcpPubSubSourceStatus) MarkEventTypes()

MarkEventTypes sets the condition that the source has created its event types.

func (*GcpPubSubSourceStatus) MarkNoEventTypes

func (s *GcpPubSubSourceStatus) MarkNoEventTypes(reason, messageFormat string, messageA ...interface{})

MarkNoEventTypes sets the condition that the source does not its event types configured.

func (*GcpPubSubSourceStatus) MarkNoSink

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

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

func (*GcpPubSubSourceStatus) MarkNoTransformer

func (s *GcpPubSubSourceStatus) MarkNoTransformer(reason, messageFormat string, messageA ...interface{})

MarkNoTransformer sets the condition that the source does not have a transformer configured.

func (*GcpPubSubSourceStatus) MarkNotDeployed

func (s *GcpPubSubSourceStatus) MarkNotDeployed(reason, messageFormat string, messageA ...interface{})

MarkNotDeployed sets the condition that the source has not been deployed.

func (*GcpPubSubSourceStatus) MarkSink

func (s *GcpPubSubSourceStatus) MarkSink(uri string)

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

func (*GcpPubSubSourceStatus) MarkSubscribed

func (s *GcpPubSubSourceStatus) MarkSubscribed()

func (*GcpPubSubSourceStatus) MarkTransformer

func (s *GcpPubSubSourceStatus) MarkTransformer(uri string)

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

Jump to

Keyboard shortcuts

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