stream

package
v0.0.0-...-e2755d2 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PushStream

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

PushStream provides reads from broker and publishes messages for the push subscription

func NewPushStream

func NewPushStream(ctx context.Context, nodeID string, subName string, subscriptionCore subscription.ICore, subscriberCore subscriber.ICore, config *httpclient.Config) (*PushStream, error)

NewPushStream return a push stream obj which is used for push subscriptions

func (*PushStream) GetErrorChannel

func (ps *PushStream) GetErrorChannel() chan error

GetErrorChannel returns the chan where stream errors are received

func (*PushStream) Start

func (ps *PushStream) Start() error

Start reads the messages from the broker and publish them to the subscription endpoint

func (*PushStream) Stop

func (ps *PushStream) Stop() error

Stop is used to terminate the push subscription processing

type PushStreamManager

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

PushStreamManager manages push stream

func NewPushStreamManager

func NewPushStreamManager(ctx context.Context, nodeID string, subName string, subscriptionCore subscription.ICore, subscriberCore subscriber.ICore, config *httpclient.Config) (*PushStreamManager, error)

NewPushStreamManager return a push stream manager obj which is used to manage push stream

func (*PushStreamManager) Run

func (psm *PushStreamManager) Run()

Run starts the push stream manager that is used to manage underlying stream

func (*PushStreamManager) Stop

func (psm *PushStreamManager) Stop()

Stop stops the stream manager along with the underlying stream

Jump to

Keyboard shortcuts

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