Skip to content

Releases: go-helium/nats

🦄 Add possibility to parse nats.servers from environment

09 Nov 21:35
de093d8
Compare
Choose a tag to compare

For example, you can use:

<PREFIX_>NATS_SERVERS_0=nats://<host1>:<port1>
<PREFIX_>NATS_SERVERS_1=nats://<host2>:<port2>
...

🧶 Stan configuration options

27 Oct 00:32
e953a5c
Compare
Choose a tag to compare
  • Add configuration options
  • Add OnConnectionLost handler
  • Update README / go.mod
nats:
  stan:
    connect_wait: duration
    pub_ack_wait: duration
    max_pub_acks_inflight: int
    ping_max_out: int
    ping_interval: int

📦 Update nats repository url

26 Oct 21:45
57f0512
Compare
Choose a tag to compare

Update to Helium v0.10.1

24 Feb 22:45
63d5d53
Compare
Choose a tag to compare
v0.2.0

NSS fail on race

Initialize

24 Feb 19:05
98e6e7f
Compare
Choose a tag to compare

Module provides you with the following things:

  • *nats.Conn represents a bare connection to a nats-server. It can send and receive []byte payloads
  • stan.Conn represents a connection to the NATS Streaming subsystem. It can Publish and Subscribe to messages within the NATS Streaming cluster.

Configuration:

  • yaml example
nats:
  url: nats://<host>:<port>
  cluster_id: string
  client_id: string
  servers: [...server slice...]
  no_randomize: bool
  name: string
  verbose: bool
  pedantic: bool
  secure: bool
  allow_reconnect: bool
  max_reconnect: int
  reconnect_wait: duration
  timeout: duration
  flusher_timeout: duration
  ping_interval: duration
  max_pings_out: int
  reconnect_buf_size: int
  sub_chan_len: int
  user: string
  password: string
  token: string
  • env example
NATS_URL=nats://<host>:<port>
NATS_CLUSTER_ID=string
NATS_CLIENT_ID=string
NATS_SERVERS=[...server slice...]
NATS_NO_RANDOMIZE=bool
NATS_NAME=string
NATS_VERBOSE=bool
NATS_PEDANTIC=bool
NATS_SECURE=bool
NATS_ALLOW_RECONNECT=bool
NATS_MAX_RECONNECT=int
NATS_RECONNECT_WAIT=duration
NATS_TIMEOUT=duration
NATS_FLUSHER_TIMEOUT=duration
NATS_PING_INTERVAL=duration
NATS_MAX_PINGS_OUT=int
NATS_RECONNECT_BUF_SIZE=int
NATS_SUB_CHAN_LEN=int
NATS_USER=string
NATS_PASSWORD=string
NATS_TOKEN=string