Interface EurekaOperations

All Known Subinterfaces:
EurekaClient

public interface EurekaOperations
API operations for Eureka. See https://github.com/Netflix/eureka/wiki/Eureka-REST-operations.
Since:
1.0
Author:
Graeme Rocher
  • Method Details

    • register

      @Post(uri="/apps/{appId}", single=true) @Retryable(attempts="${eureka.client.registration.retry-count:10}", delay="${eureka.client.registration.retry-delay:3s}") org.reactivestreams.Publisher<io.micronaut.http.HttpStatus> register(@NotBlank @NotBlank String appId, @Valid @NotNull @Body @Valid @NotNull InstanceInfo instance)
      Registers a new InstanceInfo with the Eureka server.
      Parameters:
      appId - The application id
      instance - The instance
      Returns:
      A status of HttpStatus.NO_CONTENT on success
    • deregister

      @Delete(uri="/apps/{appId}/{instanceId}", single=true) @Retryable(attempts="${eureka.client.registration.retry-count:10}", delay="${eureka.client.registration.retry-delay:3s}") org.reactivestreams.Publisher<io.micronaut.http.HttpStatus> deregister(@NotBlank @NotBlank String appId, @NotBlank @NotBlank String instanceId)
      De-registers a InstanceInfo with the Eureka server.
      Parameters:
      appId - The application id
      instanceId - The instance id (this is the value of InstanceInfo.getId())
      Returns:
      A status of HttpStatus.OK on success
    • getApplicationInfo

      @Get(uri="/apps/{appId}", single=true) org.reactivestreams.Publisher<ApplicationInfo> getApplicationInfo(@NotBlank @NotBlank String appId)
      Obtain a ApplicationInfo for the given app id.
      Parameters:
      appId - The app id
      Returns:
      The ApplicationInfo instance
    • getInstanceInfo

      @Get(uri="/apps/{appId}/{instanceId}", single=true) org.reactivestreams.Publisher<InstanceInfo> getInstanceInfo(@NotBlank @NotBlank String appId, @NotBlank @NotBlank String instanceId)
      Obtain a InstanceInfo for the given app id.
      Parameters:
      appId - The app id
      instanceId - The instance id (this is the value of InstanceInfo.getId())
      Returns:
      The InstanceInfo instance
    • getApplicationInfos

      org.reactivestreams.Publisher<List<ApplicationInfo>> getApplicationInfos()
      Obtain all of the ApplicationInfo registered with Eureka.
      Returns:
      The ApplicationInfo instances
    • getApplicationVips

      org.reactivestreams.Publisher<List<ApplicationInfo>> getApplicationVips(String vipAddress)
      Obtain all of the ApplicationInfo registered with Eureka under the given VIP address.
      Parameters:
      vipAddress - The InstanceInfo.vipAddress
      Returns:
      The ApplicationInfo instances
      See Also:
      • InstanceInfo.vipAddress
    • heartbeat

      @Put(uri="/apps/{appId}/{instanceId}", single=true) org.reactivestreams.Publisher<io.micronaut.http.HttpStatus> heartbeat(@NotBlank @NotBlank String appId, @NotBlank @NotBlank String instanceId)
      Send an application heartbeat to Eureka.
      Parameters:
      appId - The application id
      instanceId - The instance id
      Returns:
      A status of HttpStatus.OK on success
    • updateStatus

      @Put(uri="/apps/{appId}/{instanceId}/status?value={status}", single=true) org.reactivestreams.Publisher<io.micronaut.http.HttpStatus> updateStatus(@NotBlank @NotBlank String appId, @NotBlank @NotBlank String instanceId, @NotNull InstanceInfo.Status status)
      Update the application's status.
      Parameters:
      appId - The application id
      instanceId - The instance id
      status - The status to use
      Returns:
      A status of HttpStatus.OK on success
    • updateMetadata

      @Put(uri="/apps/{appId}/{instanceId}/metadata?{key}={value}", single=true) org.reactivestreams.Publisher<io.micronaut.http.HttpStatus> updateMetadata(@NotBlank @NotBlank String appId, @NotBlank @NotBlank String instanceId, @NotBlank @NotBlank String key, @NotBlank @NotBlank String value)
      Update application metadata value.
      Parameters:
      appId - The application id
      instanceId - The instance id
      key - The key to update
      value - The value to update
      Returns:
      A status of HttpStatus.OK on success