docs: public static ServiceEndpoint scan(
        List<ServiceInfo> serviceInstances,
        String endpointId,
        Address address,
        Map<String, String> endpointTags) {
  
      Set<String> contentTypes =
          DataCodec.getAllInstances().stream()
              .map(DataCodec::contentType)
              .collect(Collectors.toSet());
  
      List<ServiceRegistration> serviceRegistrations =
          serviceInstances.stream()
              .flatMap(
                  serviceInfo ->
                      Arrays.stream(serviceInfo.serviceInstance().getClass().getInterfaces())
                          .map(
                              serviceInterface ->
                                  new InterfaceInfo(serviceInterface, serviceInfo.tags())))
              .filter(
                  interfaceInfo -> interfaceInfo.serviceInterface.isAnnotationPresent(Service.class))
              .map(
                  interfaceInfo -> {
                    Class<?> serviceInterface = interfaceInfo.serviceInterface;
                    Map<String, String> serviceTags = interfaceInfo.tags;
                    String namespace = Reflect.serviceName(serviceInterface);
                    List<ServiceMethodDefinition> actions =
                        Arrays.stream(serviceInterface.getMethods())
                            .filter(method -> method.isAnnotationPresent(ServiceMethod.class))
                            .map(method -> new ServiceMethodDefinition(Reflect.methodName(method)))
                            .collect(Collectors.toList());
                    return new ServiceRegistration(namespace, serviceTags, actions);
                  })
              .collect(Collectors.toList());
  
      return new ServiceEndpoint(
          endpointId, address, contentTypes, endpointTags, serviceRegistrations);
    }