handler

package
v0.0.0-...-b94918c Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 9 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultNATSConfig

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

func NewDefaultNATSConfig

func NewDefaultNATSConfig(maxReconnect int, reconnectDelay time.Duration) DefaultNATSConfig

func (DefaultNATSConfig) GetClientID

func (DefaultNATSConfig) GetClientID() string

GetClientID returns the ClientID assigned to this producer/consumer.

func (DefaultNATSConfig) GetMaxReconnect

func (c DefaultNATSConfig) GetMaxReconnect() int

func (DefaultNATSConfig) GetReconnectDelay

func (c DefaultNATSConfig) GetReconnectDelay() time.Duration

type NATSConfig

type NATSConfig interface {
	GetClientID() string
	GetMaxReconnect() int
	GetReconnectDelay() time.Duration
}

type NATSQueue

type NATSQueue struct {

	// ClientID for NATS Streaming
	ClientID string

	// ClusterID in NATS Streaming
	ClusterID string

	// NATSURL URL to connect to NATS
	NATSURL string

	// Topic to respond to
	Topic string
	// contains filtered or unexported fields
}

NATSQueue queue for work

func CreateNATSQueue

func CreateNATSQueue(address string, port int, clusterName, channel string, clientConfig NATSConfig) (*NATSQueue, error)

CreateNATSQueue ready for asynchronous message processing of paylods of up to a maximum of 256KB in size.

func (*NATSQueue) Queue

func (q *NATSQueue) Queue(req *ftypes.QueueRequest) error

Queue request for processing

Jump to

Keyboard shortcuts

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