예제 #1
0
파일: admin.go 프로젝트: smarinskaya/skynet
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())
		}
	}
}
예제 #2
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,
		})
	}

}