Updated LEAFZ names to use remoteServer name/id and added is_spoke

This commit is contained in:
Jeremy Saenz
2023-02-28 18:09:24 -08:00
parent 95ed471866
commit 26f241cb62
3 changed files with 13 additions and 10 deletions

View File

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