示例#1
0
文件: admin.go 项目: musicglue/skynet
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())
		}
	}
}
示例#2
0
文件: admin.go 项目: musicglue/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())
		}
	}
}
示例#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,
		})
	}

}