Class ConsulHelpers
- java.lang.Object
-
- org.kiwiproject.registry.consul.server.ConsulHelpers
-
public class ConsulHelpers extends Object
Set of utilities that assist in populating a service registration.
-
-
Constructor Summary
Constructors Constructor Description ConsulHelpers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,String>newDefaultMetadata(ServiceInfo serviceInfo)Creates a map with default metadata items that theConsulRegistryClientwill be looking for when it converts a registered service back into aServiceInstance.static Map<String,String>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 Detail
-
newDefaultMetadata
public static Map<String,String> newDefaultMetadata(ServiceInfo serviceInfo)
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 prepopulated with defaults.
-
newDefaultMetadata
public static Map<String,String> newDefaultMetadata(ServiceInstance serviceInstance)
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 prepopulated with defaults.
-
-