Skip to content

Commit

Permalink
Merge pull request #900 from ripienaar/nfo_raft_group
Browse files Browse the repository at this point in the history
Render the raft group info in stream and consumers
  • Loading branch information
ripienaar authored Oct 15, 2023
2 parents 3e7f02b + d3059e5 commit 6423145
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions cli/consumer_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ func (c *consumerCmd) showInfo(config api.ConsumerConfig, state api.ConsumerInfo
if state.Cluster != nil && state.Cluster.Name != "" {
cols.AddSectionTitle("Cluster Information")
cols.AddRow("Name", state.Cluster.Name)
cols.AddRowIfNotEmpty("Raft Group", state.Cluster.RaftGroup)
cols.AddRow("Leader", state.Cluster.Leader)
for _, r := range state.Cluster.Replicas {
since := fmt.Sprintf("seen %s ago", f(r.Active))
Expand Down
1 change: 1 addition & 0 deletions cli/stream_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -1937,6 +1937,7 @@ func (c *streamCmd) showStreamInfo(info *api.StreamInfo) {
cols.AddSectionTitle("Cluster Information")

cols.AddRow("Name", info.Cluster.Name)
cols.AddRowIfNotEmpty("Raft Group", info.Cluster.RaftGroup)
cols.AddRow("Leader", info.Cluster.Leader)
for _, r := range info.Cluster.Replicas {
state := []string{r.Name}
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ require (
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/klauspost/compress v1.17.0
github.com/mattn/go-isatty v0.0.19
github.com/nats-io/jsm.go v0.1.1-0.20231002155422-ec2ddc62d18e
github.com/nats-io/jsm.go v0.1.1-0.20231015125243-98cd0c16f934
github.com/nats-io/jwt/v2 v2.5.2
github.com/nats-io/nats-server/v2 v2.10.1
github.com/nats-io/nats-server/v2 v2.10.4-0.20231014170031-a797f0d7945a
github.com/nats-io/nats.go v1.30.2
github.com/nats-io/nkeys v0.4.5
github.com/nats-io/nuid v1.0.1
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQ
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g=
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
github.com/nats-io/jsm.go v0.1.1-0.20231002155422-ec2ddc62d18e h1:sSdswSrXLmxZ2gT37lmBizmqGw3QiHHi5+0zjJ8MIYc=
github.com/nats-io/jsm.go v0.1.1-0.20231002155422-ec2ddc62d18e/go.mod h1:hB4Qd+IKoRvAAWTOI1HkCy4wotjFwOIT+codHCFOZqk=
github.com/nats-io/jsm.go v0.1.1-0.20231015125243-98cd0c16f934 h1:1swgndfzi8vxNyCBGeM56QH4riXQUOI/O3h/HKR1WmE=
github.com/nats-io/jsm.go v0.1.1-0.20231015125243-98cd0c16f934/go.mod h1:qc9SKru/hrwmtxnMZjH2oikYsH+qgJoU1YUqwvKjCnY=
github.com/nats-io/jwt/v2 v2.5.2 h1:DhGH+nKt+wIkDxM6qnVSKjokq5t59AZV5HRcFW0zJwU=
github.com/nats-io/jwt/v2 v2.5.2/go.mod h1:24BeQtRwxRV8ruvC4CojXlx/WQ/VjuwlYiH+vu/+ibI=
github.com/nats-io/nats-server/v2 v2.10.1 h1:MIJ614dhOIdo71iSzY8ln78miXwrYvlvXHUyS+XdKZQ=
github.com/nats-io/nats-server/v2 v2.10.1/go.mod h1:3PMvMSu2cuK0J9YInRLWdFpFsswKKGUS77zVSAudRto=
github.com/nats-io/nats-server/v2 v2.10.4-0.20231014170031-a797f0d7945a h1:W422MJrU4NQEdnkKb/qVEcsEiJvSDtANo5AnbHJrIgE=
github.com/nats-io/nats-server/v2 v2.10.4-0.20231014170031-a797f0d7945a/go.mod h1:lzrskZ/4gyMAh+/66cCd+q74c6v7muBypzfWhP/MAaM=
github.com/nats-io/nats.go v1.30.2 h1:aloM0TGpPorZKQhbAkdCzYDj+ZmsJDyeo3Gkbr72NuY=
github.com/nats-io/nats.go v1.30.2/go.mod h1:dcfhUgmQNN4GJEfIb2f9R7Fow+gzBF4emzDHrVBd5qM=
github.com/nats-io/nkeys v0.4.5 h1:Zdz2BUlFm4fJlierwvGK+yl20IAKUm7eV6AAZXEhkPk=
Expand Down

0 comments on commit 6423145

Please sign in to comment.