dispatcher

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

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

func NewDispatcher

func NewDispatcher(endpoint string, tOpts transport.Options, ext message.Extensions) *Dispatcher

func (*Dispatcher) Connect

func (d *Dispatcher) Connect() error

todo allow multiple transports

func (*Dispatcher) Disconnect

func (d *Dispatcher) Disconnect() error

func (*Dispatcher) Publish

func (d *Dispatcher) Publish(subscription string, authToken string, data message.Data) (err error)

func (*Dispatcher) SetTransport

func (d *Dispatcher) SetTransport(t transport.Transport)

func (*Dispatcher) Subscribe

func (d *Dispatcher) Subscribe(channel string, authToken string) (*subscription.Subscription, error)

func (*Dispatcher) Unsubscribe

func (d *Dispatcher) Unsubscribe(sub *subscription.Subscription) error

Jump to

Keyboard shortcuts

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