Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultBrokerURI

func GetDefaultBrokerURI(ns internal.Namespace) string

GetDefaultBrokerURI returns the default broker URI for a given namespace.

Types

type Client

type Client interface {
	GetChannelByLabels(ns string, labels map[string]string) (*messagingv1alpha1.Channel, error)
	GetSubscriptionByLabels(ns string, labels map[string]string) (*messagingv1alpha1.Subscription, error)
	CreateSubscription(*messagingv1alpha1.Subscription) (*messagingv1alpha1.Subscription, error)
	UpdateSubscription(*messagingv1alpha1.Subscription) (*messagingv1alpha1.Subscription, error)
	DeleteSubscription(*messagingv1alpha1.Subscription) error
	GetDefaultBroker(ns string) (*eventingv1alpha1.Broker, error)
	DeleteBroker(*eventingv1alpha1.Broker) error
	GetNamespace(name string) (*corev1.Namespace, error)
	UpdateNamespace(*corev1.Namespace) (*corev1.Namespace, error)
}

func NewClient

func NewClient(knClientSet eventingclientset.Interface, k8sClientSet k8sclientset.Interface) Client

type SubscriptionBuilder

type SubscriptionBuilder struct {
	// contains filtered or unexported fields
}

func FromSubscription

func FromSubscription(subscription *messagingv1alpha1.Subscription) *SubscriptionBuilder

Build a knative subscription builder from an existing knative subscription object Using the fluent API, the invoker can change the subscription specs and build its own Knative Subscription

func Subscription

func Subscription(prefix, namespace string) *SubscriptionBuilder

Subscription function returns a Subscription Builder Object what the invoker can use to Build a Knative Subscription in a Fluent API manner.

func (*SubscriptionBuilder) Build

Build is a final function, as per the Fluent Interface Design and returns the invoker a Knative Subscription CR, which can be used in the knative eventing go client to perform a typical kubernetes operation.

func (*SubscriptionBuilder) Labels

func (b *SubscriptionBuilder) Labels(labels map[string]string) *SubscriptionBuilder

Add Labels to the Knative Subscription Object

func (*SubscriptionBuilder) Spec

func (b *SubscriptionBuilder) Spec(channel *messagingv1alpha1.Channel, subscriberURI string) *SubscriptionBuilder

Spec adds the specification to the Knative Subscription Object