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 }
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 }
func (pc *ControlGRPCServer) ExpandWildcards(ctx context.Context, r *rpc.ExpandWildcardsRequest) (*rpc.ExpandWildcardsReply, error) { nss, serr := pc.control.ExpandWildcards(common.ToCoreNamespace(r.Namespace)) reply := &rpc.ExpandWildcardsReply{} if nss != nil { reply.NSS = convertNSS(nss) } if serr != nil { reply.Error = common.NewErrors([]serror.SnapError{serr})[0] } return reply, nil }
func (pc *ControlGRPCServer) UnsubscribeDeps(ctx context.Context, r *rpc.UnsubscribeDepsRequest) (*rpc.UnsubscribeDepsReply, error) { serrors := pc.control.UnsubscribeDeps(r.TaskId) return &rpc.UnsubscribeDepsReply{Errors: common.NewErrors(serrors)}, nil }
func (pc *ControlGRPCServer) UnsubscribeDeps(ctx context.Context, r *rpc.SubscribeDepsRequest) (*rpc.SubscribeDepsReply, error) { metrics := common.ToCoreMetrics(r.Metrics) plugins := common.MsgToCorePlugins(r.Plugins) serrors := pc.control.UnsubscribeDeps(r.TaskId, metrics, plugins) return &rpc.SubscribeDepsReply{Errors: common.NewErrors(serrors)}, nil }