Update LEAFZ to include leafnode server/connection name

This commit is contained in:
Jeremy Saenz
2023-02-28 14:20:18 -08:00
parent daadbc07cb
commit 9d4a603aaf
3 changed files with 18 additions and 1 deletions

View File

@@ -2094,6 +2094,7 @@ type LeafzOptions struct {
// LeafInfo has detailed information on each remote leafnode connection.
type LeafInfo struct {
Name string `json:"name"`
Account string `json:"account"`
IP string `json:"ip"`
Port int `json:"port"`
@@ -2133,6 +2134,7 @@ func (s *Server) Leafz(opts *LeafzOptions) (*Leafz, error) {
for _, ln := range lconns {
ln.mu.Lock()
lni := &LeafInfo{
Name: ln.opts.Name,
Account: ln.acc.Name,
IP: ln.host,
Port: int(ln.port),