MCPcopy
hub / github.com/nats-io/nats.go / IsSystemAccount

Method IsSystemAccount

nats.go:2672–2684  ·  view source on GitHub ↗

IsSystemAccount reports whether the connected client's account is the system account.

()

Source from the content-addressed store, hash-verified

2670// IsSystemAccount reports whether the connected client's account
2671// is the system account.
2672func (nc *Conn) IsSystemAccount() bool {
2673 if nc == nil {
2674 return false
2675 }
2676
2677 nc.mu.RLock()
2678 defer nc.mu.RUnlock()
2679
2680 if nc.status != CONNECTED {
2681 return false
2682 }
2683 return nc.info.IsSystemAccount
2684}
2685
2686// Low level setup for structs, etc
2687func (nc *Conn) setup() {

Callers 2

TestConnectedServerFunction · 0.80
TestIsSystemAccountFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestConnectedServerFunction · 0.64
TestIsSystemAccountFunction · 0.64