subscription

package
v25.0.0-custom-qt-impr... Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Poller

type Poller struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Poller is used to poll user subscription query.

func NewPoller

func NewPoller(globalEpoch *uint64, resolver *resolve.RequestResolver) *Poller

NewPoller returns Poller.

func (*Poller) AddSubscriber

func (p *Poller) AddSubscriber(req *schema.Request) (*SubscriberResponse, error)

AddSubscriber tries to add subscription into the existing polling goroutine if it exists. If it doesn't exist, then it creates a new polling goroutine for the given request.

func (*Poller) TerminateSubscription

func (p *Poller) TerminateSubscription(bucketID, subscriptionID uint64)

type SubscriberResponse

type SubscriberResponse struct {
	BucketID       uint64
	SubscriptionID uint64
	UpdateCh       chan interface{}
}

SubscriberResponse holds the meta data about subscriber.

Jump to

Keyboard shortcuts

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