nats

package
v0.0.0-...-40cf777 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package nats provides support for connecting to NATS server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ClusterID string
	ClientID  string
	Host      string
}

type NATS

type NATS struct {
	AckWait time.Duration
	Client  stan.Conn
}

func Connect

func Connect(cfg Config) (*NATS, error)

func (NATS) Subscribe

func (n NATS) Subscribe(subject string, queueGroupName string, cb stan.MsgHandler) error

Jump to

Keyboard shortcuts

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