natsstreaming

package
v0.0.0-...-f80b70b Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NatsURL                = "natsURL"
	NatsStreamingClusterID = "natsStreamingClusterID"
)

compulsory options

View Source
const (
	ConsumerID       = "consumerID" // passed in by Dapr runtime
	SubscriptionType = "subscriptionType"
)
View Source
const (
	DriverName = "natsstreaming"
)

Nats url format with user credentials: DefaultURL = "nats://nats_client:W64f8c6vG6@192.168.0.253:31476"

Variables

This section is empty.

Functions

func NewConnector

func NewConnector(metadata protocol.Metadata, logger logger.Logger) (driver.Connector, error)

func NewNatsStreamingDriver

func NewNatsStreamingDriver(logger logger.Logger) driver.Driver

NewNatsStreamingDriver returns a new NATS Streaming pub-sub implementation

Types

type PubSubDriver

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

NatsStreamingPubSubDriver -

func (*PubSubDriver) Features

func (d *PubSubDriver) Features() map[string]bool

Todo: natsstreaming realized ack, queue sub but not ordering. Features design from dapr components-contrib.

func (*PubSubDriver) Open

func (d *PubSubDriver) Open(metadata protocol.Metadata) (driver.Conn, error)

Connect initializes the driver and init the connection to the server.

func (*PubSubDriver) OpenConnector

func (d *PubSubDriver) OpenConnector(m protocol.Metadata) (driver.Connector, error)

func (*PubSubDriver) SatisfyFeatures

func (d *PubSubDriver) SatisfyFeatures(m protocol.Metadata) ([]string, bool)

Jump to

Keyboard shortcuts

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