Move JetStream direct APIs to private.

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2021-02-07 15:19:22 -08:00
parent cfedc3efd7
commit c16f6e193d
21 changed files with 2942 additions and 2709 deletions

View File

@@ -655,20 +655,6 @@ func shutdownCluster(c *cluster) {
c.shutdown()
}
func (c *cluster) randomServer() *server.Server {
// Since these can be randomly shutdown in certain tests make sure they are running first.
// Copy our servers list and shuffle then walk looking for first running server.
cs := append(c.servers[:0:0], c.servers...)
rand.Shuffle(len(cs), func(i, j int) { cs[i], cs[j] = cs[j], cs[i] })
for _, s := range cs {
if s.Running() {
return s
}
}
return nil
}
func (c *cluster) totalSubs() int {
totalSubs := 0
for _, s := range c.servers {