natsutil

package
v0.0.0-...-f691fa7 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StreamingComponent

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

StreamingComponent is contains reusable logic related to handling of the connection to NATS Streaming in the system.

func NewStreamingComponent

func NewStreamingComponent(kind string) *StreamingComponent

NewStreamingComponent creates a StreamingComponent

func (*StreamingComponent) ConnectToNATSStreaming

func (c *StreamingComponent) ConnectToNATSStreaming(clusterID string, options ...stan.Option) error

ConnectToNATSStreaming connects to NATS Streaming

func (*StreamingComponent) ID

func (c *StreamingComponent) ID() string

ID returns the ID from the component.

func (*StreamingComponent) NATS

func (c *StreamingComponent) NATS() stan.Conn

NATS returns the current NATS connection.

func (*StreamingComponent) Name

func (c *StreamingComponent) Name() string

Name is the label used to identify the NATS connection.

func (*StreamingComponent) Shutdown

func (c *StreamingComponent) Shutdown() error

Shutdown makes the component go away.

Jump to

Keyboard shortcuts

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