项目作者: go-helium

项目描述 :
NATS module represents a bare connection to a nats-server
高级语言: Go
项目地址: git://github.com/go-helium/nats.git
创建时间: 2019-02-24T18:02:20Z
项目社区:https://github.com/go-helium/nats

开源协议:MIT License

下载


NATS Module for Helium

Codecov
Build Status
Report
GitHub release
GitHub

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
    1. nats:
    2. url: nats://<host>:<port>
    3. cluster_id: string
    4. client_id: string
    5. servers: [...server slice...]
    6. no_randomize: bool
    7. name: string
    8. verbose: bool
    9. pedantic: bool
    10. secure: bool
    11. allow_reconnect: bool
    12. max_reconnect: int
    13. reconnect_wait: duration
    14. timeout: duration
    15. flusher_timeout: duration
    16. ping_interval: duration
    17. max_pings_out: int
    18. reconnect_buf_size: int
    19. sub_chan_len: int
    20. user: string
    21. password: string
    22. token: string
    23. stan:
    24. connect_wait: duration
    25. pub_ack_wait: duration
    26. max_pub_acks_inflight: int
    27. ping_max_out: int
    28. ping_interval: int
  • env example
    1. NATS_SERVERS_0=nats://<host>:<port>
    2. ...
    3. NATS_SERVERS_<N>=nats://<host>:<port>
    4. NATS_URL=nats://<host>:<port>
    5. NATS_CLUSTER_ID=string
    6. NATS_CLIENT_ID=string
    7. NATS_NO_RANDOMIZE=bool
    8. NATS_NAME=string
    9. NATS_VERBOSE=bool
    10. NATS_PEDANTIC=bool
    11. NATS_SECURE=bool
    12. NATS_ALLOW_RECONNECT=bool
    13. NATS_MAX_RECONNECT=int
    14. NATS_RECONNECT_WAIT=duration
    15. NATS_TIMEOUT=duration
    16. NATS_FLUSHER_TIMEOUT=duration
    17. NATS_PING_INTERVAL=duration
    18. NATS_MAX_PINGS_OUT=int
    19. NATS_RECONNECT_BUF_SIZE=int
    20. NATS_SUB_CHAN_LEN=int
    21. NATS_USER=string
    22. NATS_PASSWORD=string
    23. NATS_TOKEN=string
    24. NATS_STAN_CONNECT_WAIT=duration
    25. NATS_STAN_PUB_ACK_WAIT=duration
    26. NATS_STAN_MAX_PUB_ACKS_INFLIGHT=int
    27. NATS_STAN_PING_MAX_OUT=int
    28. NATS_STAN_PING_INTERVAL=int