v1alpha1

package
v0.17.5 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// ChannelConditionReady has status True when all subconditions below have
	// been set to True.
	ChannelConditionReady = apis.ConditionReady

	// ChannelConditionAddressable has status true when this Channel meets the
	// Addressable contract and has a non-empty url.
	ChannelConditionAddressable apis.ConditionType = "Addressable"

	// ChannelConditionTopicReady has status True when the Channel has had a
	// Pub/Sub topic created for it.
	ChannelConditionTopicReady apis.ConditionType = "TopicReady"
)

Variables

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

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

	// Spec defines the desired state of the Channel.
	Spec ChannelSpec `json:"spec,omitempty"`

	// Status represents the current state of the Channel. This data may be out of
	// date.
	// +optional
	Status ChannelStatus `json:"status,omitempty"`
}

Channel is a resource representing an channel backed by Google Cloud Pub/Sub.

func (*Channel) CheckImmutableFields

func (current *Channel) CheckImmutableFields(ctx context.Context, original *Channel) *apis.FieldError

func (*Channel) ConditionSet added in v0.14.0

func (s *Channel) ConditionSet() *apis.ConditionSet

ConditionSet returns the apis.ConditionSet of the embedding object

func (*Channel) ConvertFrom added in v0.15.0

func (sink *Channel) ConvertFrom(ctx context.Context, from apis.Convertible) error

ConvertFrom implements apis.Convertible. Converts obj from v1alpha1.Channel into v1beta1.Channel.

func (*Channel) ConvertTo added in v0.15.0

func (source *Channel) ConvertTo(ctx context.Context, to apis.Convertible) error

ConvertTo implements apis.Convertible. Converts source (from v1beta1.Channel) into v1alpha1.Channel.

func (*Channel) DeepCopy

func (in *Channel) DeepCopy() *Channel

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

func (*Channel) DeepCopyInto

func (in *Channel) DeepCopyInto(out *Channel)

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

func (*Channel) DeepCopyObject

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

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

func (*Channel) GetGroupVersionKind

func (c *Channel) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns GroupVersionKind for Pub/Sub backed Channel.

func (*Channel) IdentitySpec added in v0.14.0

func (c *Channel) IdentitySpec() *duckv1alpha1.IdentitySpec

Methods for identifiable interface. IdentitySpec returns the IdentitySpec portion of the Spec.

func (*Channel) IdentityStatus added in v0.14.0

func (c *Channel) IdentityStatus() *duckv1alpha1.IdentityStatus

IdentityStatus returns the IdentityStatus portion of the Status.

func (*Channel) SetDefaults

func (c *Channel) SetDefaults(ctx context.Context)

func (*Channel) Validate

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

type ChannelList

type ChannelList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Channel `json:"items"`
}

ChannelList is a collection of Pub/Sub backed Channels.

func (*ChannelList) DeepCopy

func (in *ChannelList) DeepCopy() *ChannelList

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

func (*ChannelList) DeepCopyInto

func (in *ChannelList) DeepCopyInto(out *ChannelList)

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

func (*ChannelList) DeepCopyObject

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

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

type ChannelSpec

type ChannelSpec struct {
	duckv1alpha1.IdentitySpec `json:",inline"`
	// Secret is the credential to use to create, publish, and poll the Pub/Sub
	// Topic and Subscriptions. 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).
	// +optional
	Secret *corev1.SecretKeySelector `json:"secret,omitempty"`

	// Project is the ID of the Google Cloud Project that the Pub/Sub
	// Topic and Subscriptions will be created in.
	// +optional
	Project string `json:"project,omitempty"`

	// Channel conforms to Duck type Subscribable.
	// +optional
	Subscribable *eventingduck.Subscribable `json:"subscribable,omitempty"`
}

ChannelSpec defines which subscribers have expressed interest in receiving events from this Channel. arguments for a Channel.

func (*ChannelSpec) DeepCopy

func (in *ChannelSpec) DeepCopy() *ChannelSpec

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

func (*ChannelSpec) DeepCopyInto

func (in *ChannelSpec) DeepCopyInto(out *ChannelSpec)

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

func (*ChannelSpec) SetDefaults

func (cs *ChannelSpec) SetDefaults(ctx context.Context)

func (*ChannelSpec) Validate

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

type ChannelStatus

type ChannelStatus struct {
	duckv1alpha1.IdentityStatus `json:",inline"`

	// Channel is Addressable. It currently exposes the endpoint as a
	// fully-qualified DNS name which will distribute traffic over the
	// provided targets from inside the cluster.
	//
	// It generally has the form {channel}.{namespace}.svc.{cluster domain name}
	duckv1.AddressStatus `json:",inline"`

	// SubscribableTypeStatus is populated with the statuses of each of the Channelable's subscribers.
	eventingduck.SubscribableTypeStatus `json:",inline"`

	// ProjectID is the resolved project ID in use by the Channel.
	// +optional
	ProjectID string `json:"projectId,omitempty"`

	// TopicID is the created topic ID used by the Channel.
	// +optional
	TopicID string `json:"topicId,omitempty"`
}

ChannelStatus represents the current state of a Channel.

func (*ChannelStatus) DeepCopy

func (in *ChannelStatus) DeepCopy() *ChannelStatus

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

func (*ChannelStatus) DeepCopyInto

func (in *ChannelStatus) DeepCopyInto(out *ChannelStatus)

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

func (*ChannelStatus) GetCondition

func (cs *ChannelStatus) GetCondition(t apis.ConditionType) *apis.Condition

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

func (*ChannelStatus) GetTopLevelCondition added in v0.12.0

func (cs *ChannelStatus) GetTopLevelCondition() *apis.Condition

GetTopLevelCondition returns the top level condition.

func (*ChannelStatus) InitializeConditions

func (cs *ChannelStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*ChannelStatus) IsReady

func (cs *ChannelStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*ChannelStatus) MarkTopicFailed added in v0.12.0

func (cs *ChannelStatus) MarkTopicFailed(reason, messageFormat string, messageA ...interface{})

MarkTopicFailed sets the condition that signals there is not a topic for this Channel. This could be because of an error or the Channel is being deleted.

func (*ChannelStatus) MarkTopicNotConfigured added in v0.12.0

func (cs *ChannelStatus) MarkTopicNotConfigured()

func (*ChannelStatus) MarkTopicNotOwned

func (cs *ChannelStatus) MarkTopicNotOwned(messageFormat string, messageA ...interface{})

func (*ChannelStatus) MarkTopicReady

func (cs *ChannelStatus) MarkTopicReady()

MarkTopicReady sets the condition that the topic has been created and ready.

func (*ChannelStatus) MarkTopicUnknown added in v0.12.0

func (cs *ChannelStatus) MarkTopicUnknown(reason, messageFormat string, messageA ...interface{})

func (*ChannelStatus) PropagateTopicStatus added in v0.12.0

func (cs *ChannelStatus) PropagateTopicStatus(ts *v1alpha1.TopicStatus)

func (*ChannelStatus) SetAddress

func (cs *ChannelStatus) SetAddress(url *apis.URL)

SetAddress updates the Addressable status of the channel and propagates a url status to the Addressable status condition based on url.

Jump to

Keyboard shortcuts

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