class ClusterManagerBucketLoader extends BaseBucketLoader {

  @Override
  protected Mono<byte[]> discoverConfig(final NodeIdentifier seed, final String bucket) {
    final CoreContext ctx = core().context();

    return Mono.defer(() -> {
      BucketConfigRequest request = new BucketConfigRequest(
        ctx.environment().timeoutConfig().connectTimeout(),
        ctx,
        BestEffortRetryStrategy.INSTANCE,
        bucket,
        ctx.authenticator(),
        seed
      );
      core().send(request);
      return Reactor.wrap(request, request.response(), true);
    }).map(response -> {
      if (response.status().success()) {
        return response.config();
      } else {
        throw new ConfigException("Received error status from ClusterManagerBucketLoader: " + response);
      }
    });
  }

  public  ClusterManagerBucketLoader(final Core core);

}