Beispiel #1
0
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())
		}
	}
}
Beispiel #2
0
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())
		}
	}
}
Beispiel #3
0
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,
		})
	}

}