resources

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractUIDFromPullSubscriptionName added in v0.16.0

func ExtractUIDFromPullSubscriptionName(name string) string

ExtractUIDFromPullSubscriptionName extracts the subscriber's UID from the PullSubscription name.

func GeneratePublisherName

func GeneratePublisherName(channel *v1beta1.Channel) string

func GeneratePullSubscriptionName added in v0.16.0

func GeneratePullSubscriptionName(UID types.UID) string

GeneratePullSubscriptionName generates the name of the PullSubscription resource using the subscriber's UID.

func GenerateTopicID

func GenerateTopicID(channel *v1beta1.Channel) string

GenerateTopicID generates the name of the Pub/Sub topic, not our Topic resource.

func GetLabelSelector

func GetLabelSelector(controller, channel, uid string) labels.Selector

func GetLabels

func GetLabels(controller, channel, uid string) map[string]string

func GetPullSubscriptionAnnotations

func GetPullSubscriptionAnnotations(channel, clusterName string) map[string]string

func GetPullSubscriptionLabelSelector

func GetPullSubscriptionLabelSelector(controller, source, subscriber, uid string) labels.Selector

func GetPullSubscriptionLabels

func GetPullSubscriptionLabels(controller, channel, subscriber, uid string) map[string]string

func GetTopicAnnotations added in v0.15.0

func GetTopicAnnotations(clusterName string) map[string]string

func MakePullSubscription

func MakePullSubscription(args *PullSubscriptionArgs) *v1beta1.PullSubscription

MakePullSubscription generates (but does not insert into K8s) the PullSubscription for Channels.

func MakeTopic

func MakeTopic(args *TopicArgs) *v1beta1.Topic

MakeInvoker generates (but does not insert into K8s) the Topic for Channels.

Types

type PullSubscriptionArgs

type PullSubscriptionArgs struct {
	Owner              kmeta.OwnerRefable
	Name               string
	Project            string
	Topic              string
	ServiceAccount     string
	ServiceAccountName string
	Secret             *corev1.SecretKeySelector
	Labels             map[string]string
	Annotations        map[string]string
	Subscriber         duckv1beta1.SubscriberSpec
}

PullSubscriptionArgs are the arguments needed to create a Channel Subscriber. Every field is required.

type TopicArgs

type TopicArgs struct {
	Owner              kmeta.OwnerRefable
	Name               string
	Project            string
	Topic              string
	ServiceAccount     string
	ServiceAccountName string
	Secret             *corev1.SecretKeySelector
	Labels             map[string]string
	Annotations        map[string]string
}

TopicArgs are the arguments needed to create a Channel Topic. Every field is required.

Jump to

Keyboard shortcuts

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