Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Renames CollectMetricsReply in controlproxy avoiding duplicate regist…
Browse files Browse the repository at this point in the history
…ration
  • Loading branch information
jcooklin committed Jun 30, 2016
1 parent ed1733b commit 51314c6
Show file tree
Hide file tree
Showing 6 changed files with 272 additions and 290 deletions.
8 changes: 4 additions & 4 deletions control/control_grpc_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (pc *ControlGRPCServer) ProcessMetrics(ctx context.Context, r *rpc.PubProcM
return reply, nil
}

func (pc *ControlGRPCServer) CollectMetrics(ctx context.Context, r *rpc.CollectMetricsRequest) (*rpc.CollectMetricsReply, error) {
func (pc *ControlGRPCServer) CollectMetrics(ctx context.Context, r *rpc.CollectMetricsRequest) (*rpc.CollectMetricsResponse, error) {
metrics := common.ToCoreMetrics(r.Metrics)
deadline := time.Unix(r.Deadline.Sec, r.Deadline.Nsec)
var AllTags map[string]map[string]string
Expand All @@ -81,13 +81,13 @@ func (pc *ControlGRPCServer) CollectMetrics(ctx context.Context, r *rpc.CollectM
}
}
mts, errs := pc.control.CollectMetrics(metrics, deadline, r.TaskID, AllTags)
var reply *rpc.CollectMetricsReply
var reply *rpc.CollectMetricsResponse
if mts == nil {
reply = &rpc.CollectMetricsReply{
reply = &rpc.CollectMetricsResponse{
Errors: errorsToStrings(errs),
}
} else {
reply = &rpc.CollectMetricsReply{
reply = &rpc.CollectMetricsResponse{
Metrics: common.NewMetrics(mts),
Errors: errorsToStrings(errs),
}
Expand Down
Loading

0 comments on commit 51314c6

Please sign in to comment.