v1alpha1

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: Apache-2.0 Imports: 10 Imported by: 18

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=duck.cloud.run

Index

Constants

View Source
const (
	// TopicReady has status True when the PubSub Topic is ready.
	TopicReady apis.ConditionType = "TopicReady"

	// PullSubscriptionReay has status True when the PullSubscription is ready.
	PullSubscriptionReady apis.ConditionType = "PullSubscriptionReady"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: duck.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 PubSub

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

	Spec   PubSubSpec   `json:"spec"`
	Status PubSubStatus `json:"status"`
}

PubSub is a shared type that GCP sources which create a Topic / PullSubscription will use. This duck type is intended to allow implementors of GCP sources which use PubSub for their transport.

func (*PubSub) DeepCopy

func (in *PubSub) DeepCopy() *PubSub

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

func (*PubSub) DeepCopyInto

func (in *PubSub) DeepCopyInto(out *PubSub)

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

func (*PubSub) DeepCopyObject

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

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

func (*PubSub) GetFullType

func (*PubSub) GetFullType() duck.Populatable

GetFullType implements duck.Implementable

func (*PubSub) GetListType

func (*PubSub) GetListType() runtime.Object

GetListType implements apis.Listable

func (*PubSub) Populate

func (s *PubSub) Populate()

Populate implements duck.Populatable

type PubSubList

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

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

PubSubList is a list of PubSub resources

func (*PubSubList) DeepCopy

func (in *PubSubList) DeepCopy() *PubSubList

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

func (*PubSubList) DeepCopyInto

func (in *PubSubList) DeepCopyInto(out *PubSubList)

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

func (*PubSubList) DeepCopyObject

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

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

type PubSubSpec

type PubSubSpec struct {
	// This brings in CloudEventOverrides and Sink
	duckv1.SourceSpec

	// Secret is the credential to use to create the Scheduler Job.
	// If not specified, defaults to:
	// Name: google-cloud-key
	// Key: key.json
	// +optional
	Secret *corev1.SecretKeySelector `json:"Secret,omitempty"`

	// PubSubSecret is the credential to use to create
	// Topic / PullSubscription resources. If omitted, uses Secret
	PubSubSecret *corev1.SecretKeySelector `json:"pubsubSecret,omitempty"`

	// Project is the ID of the Google Cloud Project that the PubSub Topic exists in.
	// If omitted, defaults to same as the cluster.
	// +optional
	Project string `json:"project,omitempty"`
}

func (*PubSubSpec) DeepCopy

func (in *PubSubSpec) DeepCopy() *PubSubSpec

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

func (*PubSubSpec) DeepCopyInto

func (in *PubSubSpec) DeepCopyInto(out *PubSubSpec)

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

type PubSubStatus

type PubSubStatus struct {
	// This brings in duck/v1beta1 Status as well as SinkURI
	duckv1.SourceStatus

	// ProjectID is the project ID of the Topic, might have been resolved.
	// +optional
	ProjectID string `json:"projectId,omitempty"`

	// TopicID where the notifications are sent to.
	// +optional
	TopicID string `json:"topicId,omitempty"`

	// SubscriptionID is the created subscription ID used by Storage.
	// +optional
	SubscriptionID string `json:"subscriptionId,omitempty"`
}

PubSubStatus shows how we expect folks to embed Addressable in their Status field.

func (*PubSubStatus) DeepCopy

func (in *PubSubStatus) DeepCopy() *PubSubStatus

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

func (*PubSubStatus) DeepCopyInto

func (in *PubSubStatus) DeepCopyInto(out *PubSubStatus)

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

func (*PubSubStatus) IsReady

func (ss *PubSubStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*PubSubStatus) MarkPullSubscriptionNotReady

func (s *PubSubStatus) MarkPullSubscriptionNotReady(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})

MarkPullSubscriptionNotReady sets the condition that the PubSub PullSUbscription is not ready and why.

func (*PubSubStatus) MarkPullSubscriptionReady

func (s *PubSubStatus) MarkPullSubscriptionReady(cs *apis.ConditionSet)

MarkPullSubscriptionReady sets the condition that the PubSub PullSubscription is ready.

func (*PubSubStatus) MarkTopicNotReady

func (s *PubSubStatus) MarkTopicNotReady(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})

MarkTopicNotReady sets the condition that the PubSub Topic is not ready and why.

func (*PubSubStatus) MarkTopicReady

func (s *PubSubStatus) MarkTopicReady(cs *apis.ConditionSet)

MarkTopicReady sets the condition that the PubSub Topic is ready.

Jump to

Keyboard shortcuts

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