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 Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<io.micronaut.http.HttpStatus>
deregister
(@NotBlank String appId, @NotBlank String instanceId) De-registers aInstanceInfo
with the Eureka server.org.reactivestreams.Publisher<ApplicationInfo>
getApplicationInfo
(@NotBlank String appId) Obtain aApplicationInfo
for the given app id.org.reactivestreams.Publisher<List<ApplicationInfo>>
Obtain all of theApplicationInfo
registered with Eureka.org.reactivestreams.Publisher<List<ApplicationInfo>>
getApplicationVips
(String vipAddress) Obtain all of theApplicationInfo
registered with Eureka under the given VIP address.org.reactivestreams.Publisher<InstanceInfo>
getInstanceInfo
(@NotBlank String appId, @NotBlank String instanceId) Obtain aInstanceInfo
for the given app id.org.reactivestreams.Publisher<io.micronaut.http.HttpStatus>
Send an application heartbeat to Eureka.org.reactivestreams.Publisher<io.micronaut.http.HttpStatus>
register
(@NotBlank String appId, @Valid @NotNull InstanceInfo instance) Registers a newInstanceInfo
with the Eureka server.org.reactivestreams.Publisher<io.micronaut.http.HttpStatus>
updateMetadata
(@NotBlank String appId, @NotBlank String instanceId, @NotBlank String key, @NotBlank String value) Update application metadata value.org.reactivestreams.Publisher<io.micronaut.http.HttpStatus>
updateStatus
(@NotBlank String appId, @NotBlank String instanceId, InstanceInfo.Status status) Update the application's status.
-
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 newInstanceInfo
with the Eureka server.- Parameters:
appId
- The application idinstance
- 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 aInstanceInfo
with the Eureka server.- Parameters:
appId
- The application idinstanceId
- The instance id (this is the value ofInstanceInfo.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 aApplicationInfo
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 aInstanceInfo
for the given app id.- Parameters:
appId
- The app idinstanceId
- The instance id (this is the value ofInstanceInfo.getId()
)- Returns:
- The
InstanceInfo
instance
-
getApplicationInfos
org.reactivestreams.Publisher<List<ApplicationInfo>> getApplicationInfos()Obtain all of theApplicationInfo
registered with Eureka.- Returns:
- The
ApplicationInfo
instances
-
getApplicationVips
Obtain all of theApplicationInfo
registered with Eureka under the given VIP address.- Parameters:
vipAddress
- TheInstanceInfo.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 idinstanceId
- 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 idinstanceId
- The instance idstatus
- 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 idinstanceId
- The instance idkey
- The key to updatevalue
- The value to update- Returns:
- A status of
HttpStatus.OK
on success
-