Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NATSComponent ¶
type NATSComponent struct {
// contains filtered or unexported fields
}
NATSComponent is contains reusable logic related to handling of the connection to NATS in the system.
func NewNATSComponent ¶
func NewNATSComponent(name string) *NATSComponent
NewNATSComponent creates a StreamingComponent
func (*NATSComponent) ConnectToServer ¶
func (c *NATSComponent) ConnectToServer(url string, options ...nats.Option) error
ConnectToServer connects to NATS Server
func (*NATSComponent) JetStreamContext ¶
func (c *NATSComponent) JetStreamContext(opts ...nats.JSOpt) (nats.JetStreamContext, error)
JetStreamContext returns the returns a JetStreamContext for messaging and stream management.
func (*NATSComponent) NATS ¶
func (c *NATSComponent) NATS() *nats.Conn
NATS returns the current NATS connection.
func (*NATSComponent) Name ¶
func (c *NATSComponent) Name() string
Name is the label used to identify the NATS connection.
func (*NATSComponent) Shutdown ¶
func (c *NATSComponent) Shutdown() error
Shutdown makes the component go away.
Click to show internal directories.
Click to hide internal directories.