code: func (s *Service) ExtractRemote() error {
  	typeName := reflect.Indirect(s.Receiver).Type().Name()
  	if typeName == "" {
  		return errors.New("no service name for type " + s.Type.String())
  	}
  	if !isExported(typeName) {
  		return errors.New("type " + typeName + " is not exported")
  	}
  
  	// Install the methods
  	s.Remotes = suitableRemoteMethods(s.Type, s.Options.nameFunc)
  
  	if len(s.Remotes) == 0 {
  		str := ""
  		// To help the user, see if a pointer receiver would work.
  		method := suitableRemoteMethods(reflect.PtrTo(s.Type), s.Options.nameFunc)
  		if len(method) != 0 {
  			str = "type " + s.Name + " has no exported methods of remote type (hint: pass a pointer to value of that type)"
  		} else {
  			str = "type " + s.Name + " has no exported methods of remote type"
  		}
  		return errors.New(str)
  	}
  
  	for i := range s.Remotes {
  		s.Remotes[i].Receiver = s.Receiver
  	}
  	return nil
  }
docs: // ExtractRemote extract the set of methods from the
  // receiver value which satisfy the following conditions:
  // - exported method of exported type
  // - two return values
  // - the first return implements protobuf interface
  // - the second return is an error