nats

package
v0.0.0-...-e7652ed Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SubjectFormat = 'Ticks.<exchange>.<pairSymbol>'
	SubjectFormat = "Ticks.%s.%s"
)

Variables

View Source
var (
	ErrInvalidConfig = errors.New("invalid NATS config")
)

Functions

This section is empty.

Types

type Client

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

func New

func New() (*Client, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) Publish

func (c *Client) Publish(tick tick.Tick) error

func (*Client) Subscribe

func (c *Client) Subscribe(symbol string) (<-chan tick.Tick, error)

type Config

type Config struct {
	URL string
}

func (*Config) Load

func (c *Config) Load() *Config

func (Config) Validate

func (c Config) Validate() error

Jump to

Keyboard shortcuts

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