code: func (s *MockDiscoveryServer) Discover(ctx context.Context, request *discovery.SignedRequest) (*discovery.Response, error) {
  	if request == nil {
  		return nil, errors.New("nil request")
  	}
  
  	req := &discovery.Request{}
  	err := proto.Unmarshal(request.Payload, req)
  	if err != nil {
  		return nil, errors.Wrap(err, "failed parsing request")
  	}
  	if req.Authentication == nil {
  		return nil, errors.New("access denied, no authentication info in request")
  	}
  	if len(req.Authentication.ClientIdentity) == 0 {
  		return nil, errors.New("access denied, client identity wasn't supplied")
  	}
  
  	var results []*discovery.QueryResult
  	for _, q := range req.Queries {
  		result := s.processQuery(q)
  		if result != nil {
  			results = append(results, result)
  		}
  	}
  	return &discovery.Response{
  		Results: results,
  	}, nil
  }
docs: // Discover Processes the given Discovery request and returns a mock response