func Unregister(q *skynet.Query) { instances := filterDaemon(q.FindInstances()) for _, instance := range instances { cladmin := client.Admin{ Instance: instance, } _, err := cladmin.Unregister(skynet.UnregisterRequest{}) if err != nil { config.Log.Error(err.Error()) } } }
func AdminStop(q *skynet.Query) { instances := q.FindInstances() for _, instance := range instances { cladmin := client.Admin{ Instance: instance, } _, err := cladmin.Stop(skynet.StopRequest{ WaitForClients: true, }) if err != nil { config.Log.Error(err.Error()) } } }
func (ss *SubService) sendRPCStop() { q := skynet.Query{ UUID: ss.UUID, DoozerConn: ss.doozer, } instances := q.FindInstances() for _, instance := range instances { cladmin := client.Admin{ Instance: instance, } cladmin.Stop(skynet.StopRequest{ WaitForClients: true, }) } }