Beispiel #1
0
// proxy
func ReportStatus(args *model.AgentReportRequest, reply *model.SimpleRpcResponse) error {
	if args.Hostname == "" {
		reply.Code = 1
		return nil
	}

	return proxy("Agent.ReportStatus", args, reply)
}
Beispiel #2
0
func (t *Agent) ReportStatus(args *model.AgentReportRequest, reply *model.SimpleRpcResponse) error {
	if args.Hostname == "" {
		reply.Code = 1
		return nil
	}

	cache.Agents.Put(args)

	return nil
}
Beispiel #3
0
func (t *Agent) ReportStatus(args *model.AgentReportRequest, reply *model.SimpleRpcResponse) error {
	if args.Hostname == "" {
		reply.Code = 1
		return nil
	}

	cache.Agents.Put(args)

	debug := g.Config().Debug
	if debug {
		log.Printf("[DEBUG] ReportStatus args is %v, reply is %v", args, reply)
	}

	return nil
}