Skip to content

Commit

Permalink
Add in proto to INFO
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Collison <derek@nats.io>
  • Loading branch information
derekcollison committed Jun 29, 2018
1 parent 535367e commit a7dd092
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/const.go
Expand Up @@ -35,7 +35,13 @@ var (

const (
// VERSION is the current version for the server.
VERSION = "1.2.0-beta3"
VERSION = "1.2.0-beta4"

// PROTO is the currently supported protocol.
// 0 was the original
// 1 maintains proto 0, adds echo abilities for CONNECT from the client. Clients
// should not send echo unless proto in INFO is >= 1.
PROTO = 1

// DEFAULT_PORT is the default port for client connections.
DEFAULT_PORT = 4222
Expand Down
2 changes: 2 additions & 0 deletions server/server.go
Expand Up @@ -41,6 +41,7 @@ import (
type Info struct {
ID string `json:"server_id"`
Version string `json:"version"`
Proto int `json:"proto"`
GitCommit string `json:"git_commit,omitempty"`
GoVersion string `json:"go"`
Host string `json:"host"`
Expand Down Expand Up @@ -144,6 +145,7 @@ func New(opts *Options) *Server {
info := Info{
ID: genID(),
Version: VERSION,
Proto: PROTO,
GitCommit: gitCommit,
GoVersion: runtime.Version(),
Host: opts.Host,
Expand Down

0 comments on commit a7dd092

Please sign in to comment.