Example #1
0
func (pc *ControlGRPCServer) SubscribeDeps(ctx context.Context, r *rpc.SubscribeDepsRequest) (*rpc.SubscribeDepsReply, error) {
	plugins := common.ToSubPlugins(r.Plugins)
	configTree := cdata.NewTree()
	requested := common.MetricToRequested(r.Requested)
	serrors := pc.control.SubscribeDeps(r.TaskId, requested, plugins, configTree)
	return &rpc.SubscribeDepsReply{Errors: common.NewErrors(serrors)}, nil
}
Example #2
0
func (pc *ControlGRPCServer) ValidateDeps(ctx context.Context, r *rpc.ValidateDepsRequest) (*rpc.ValidateDepsReply, error) {
	metrics := common.ToRequestedMetrics(r.Metrics)
	plugins := common.ToSubPlugins(r.Plugins)
	configTree := cdata.NewTree()
	serrors := pc.control.ValidateDeps(metrics, plugins, configTree)
	return &rpc.ValidateDepsReply{Errors: common.NewErrors(serrors)}, nil
}