All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hubspot.singularity.hooks.LoadBalancerClient Maven / Gradle / Ivy

package com.hubspot.singularity.hooks;

import com.hubspot.baragon.models.UpstreamInfo;
import com.hubspot.singularity.LoadBalancerRequestType.LoadBalancerRequestId;
import com.hubspot.singularity.SingularityCheckingUpstreamsUpdate;
import com.hubspot.singularity.SingularityDeploy;
import com.hubspot.singularity.SingularityLoadBalancerUpdate;
import com.hubspot.singularity.SingularityRequest;
import com.hubspot.singularity.SingularityTask;
import java.io.IOException;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;

public interface LoadBalancerClient {
  SingularityLoadBalancerUpdate enqueue(
    LoadBalancerRequestId loadBalancerRequestId,
    SingularityRequest request,
    SingularityDeploy deploy,
    List add,
    List remove
  );

  SingularityLoadBalancerUpdate getState(LoadBalancerRequestId loadBalancerRequestId);

  SingularityLoadBalancerUpdate cancel(LoadBalancerRequestId loadBalancerRequestId);

  SingularityLoadBalancerUpdate delete(
    LoadBalancerRequestId loadBalancerRequestId,
    String requestId,
    Set loadBalancerGroups,
    String serviceBasePath
  );

  SingularityCheckingUpstreamsUpdate getLoadBalancerServiceStateForRequest(
    String singularityRequestId
  )
    throws IOException, InterruptedException, ExecutionException, TimeoutException;

  List getUpstreamsForTasks(
    List tasks,
    String requestId,
    Optional loadBalancerUpstreamGroup
  );

  SingularityLoadBalancerUpdate makeAndSendLoadBalancerRequest(
    LoadBalancerRequestId loadBalancerRequestId,
    List addUpstreams,
    List removeUpstreams,
    SingularityDeploy deploy,
    SingularityRequest request
  );
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy