dispatcher

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NatssDispatcher added in v0.12.0

type NatssDispatcher interface {
	Start(stopCh <-chan struct{}) error
	UpdateSubscriptions(channel *messagingv1alpha1.Channel, isFinalizer bool) (map[eventingduck.SubscriberSpec]error, error)
	ProcessChannels(ctx context.Context, chanList []messagingv1alpha1.Channel) error
}

func NewDispatcher

func NewDispatcher(natssURL, clusterID, clientID string, logger *zap.Logger) (NatssDispatcher, error)

NewDispatcher returns a new NatssDispatcher.

type SubscriptionChannelMapping added in v0.12.0

type SubscriptionChannelMapping map[eventingchannels.ChannelReference]map[subscriptionReference]*stan.Subscription

type SubscriptionsSupervisor

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

SubscriptionsSupervisor manages the state of NATS Streaming subscriptions

func (*SubscriptionsSupervisor) Connect

func (s *SubscriptionsSupervisor) Connect(stopCh <-chan struct{})

Connect is called for initial connection as well as after every disconnect

func (*SubscriptionsSupervisor) ProcessChannels added in v0.12.0

func (s *SubscriptionsSupervisor) ProcessChannels(ctx context.Context, chanList []messagingv1alpha1.Channel) error

ProcessChannels will be called from the controller that watches natss channels. It will update internal hostToChannelMap which is used to resolve the hostHeader of the incoming request to the correct ChannelReference in the receiver function.

func (*SubscriptionsSupervisor) Start

func (s *SubscriptionsSupervisor) Start(stopCh <-chan struct{}) error

func (*SubscriptionsSupervisor) UpdateSubscriptions

func (s *SubscriptionsSupervisor) UpdateSubscriptions(channel *messagingv1alpha1.Channel, isFinalizer bool) (map[eventingduck.SubscriberSpec]error, error)

UpdateSubscriptions creates/deletes the natss subscriptions based on channel.Spec.Subscribable.Subscribers Return type:map[eventingduck.SubscriberSpec]error --> Returns a map of subscriberSpec that failed with the value=error encountered. Ignore the value in case error != nil

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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