topics

package
v0.0.0-...-5cd5cfe Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForwardRequestToSubscribers

func ForwardRequestToSubscribers(subscribers []*WorkerConnection, request *topicspb.ServerMessage) (bool, error)

ForwardRequestToSubscribers forwards an event to all subscribers for a given topic returns a slice of errors encountered while forwarding the event

Types

type SubscriberManager

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

func New

func New() *SubscriberManager

func (*SubscriberManager) HandleRequest

func (s *SubscriberManager) HandleRequest(request *topicspb.ServerMessage) (*topicspb.ClientMessage, error)

func (*SubscriberManager) Subscribe

func (s *SubscriberManager) Subscribe(subscriberConnectionStream topicspb.Subscriber_SubscribeServer) error

Subscribe allows the local nitric server to register new subscribers

called by Nitric applications wishing to subscribe to a topic.
the stream establishes communication between that subscriber and this server

func (*SubscriberManager) WorkerCount

func (s *SubscriberManager) WorkerCount() int

type SubscriptionRequestHandler

type SubscriptionRequestHandler interface {
	topicspb.SubscriberServer
	HandleRequest(request *topicspb.ServerMessage) (*topicspb.ClientMessage, error)
	WorkerCount() int
}

type TopicName

type TopicName = string

Jump to

Keyboard shortcuts

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