Class ConsulHelpers
java.lang.Object
org.kiwiproject.registry.consul.server.ConsulHelpers
Set of utilities that assist in populating a service registration.
-
Method Summary
Modifier and TypeMethodDescriptionnewDefaultMetadata(ServiceInfo serviceInfo) Creates a map with default metadata items that theConsulRegistryClientwill be looking for when it converts a registered service back into aServiceInstance.newDefaultMetadata(ServiceInstance serviceInstance) Creates a map with default metadata items that theConsulRegistryClientwill be looking for when it converts a registered service back into aServiceInstance.
-
Method Details
-
newDefaultMetadata
Creates a map with default metadata items that theConsulRegistryClientwill be looking for when it converts a registered service back into aServiceInstance.This map is intended to be a baseline of metadata to register. This map is modifiable, so it can easily be changed or added to later in the registration process.
- Parameters:
serviceInfo- the information about the service to pull data from.- Returns:
- a map that is pre-populated with defaults.
-
newDefaultMetadata
Creates a map with default metadata items that theConsulRegistryClientwill be looking for when it converts a registered service back into aServiceInstance.This map is intended to be a baseline of metadata to register. This map is modifiable, so it can easily be changed or added to later in the registration process.
- Parameters:
serviceInstance- the information about the service to pull data from.- Returns:
- a map that is pre-populated with defaults.
-