get-local-endpoint

Retrieve endpoints from environment variables

License

License

GroupId

GroupId

com.github.brymck
ArtifactId

ArtifactId

get-local-endpoint
Last Version

Last Version

0.9.3
Release Date

Release Date

Type

Type

jar
Description

Description

get-local-endpoint
Retrieve endpoints from environment variables
Project URL

Project URL

https://github.com/brymck/get-local-endpoint
Source Code Management

Source Code Management

https://github.com/brymck/get-local-endpoint

Download get-local-endpoint

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.brymck/get-local-endpoint/ -->
<dependency>
    <groupId>com.github.brymck</groupId>
    <artifactId>get-local-endpoint</artifactId>
    <version>0.9.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.brymck/get-local-endpoint/
implementation 'com.github.brymck:get-local-endpoint:0.9.3'
// https://jarcasting.com/artifacts/com.github.brymck/get-local-endpoint/
implementation ("com.github.brymck:get-local-endpoint:0.9.3")
'com.github.brymck:get-local-endpoint:jar:0.9.3'
<dependency org="com.github.brymck" name="get-local-endpoint" rev="0.9.3">
  <artifact name="get-local-endpoint" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.brymck', module='get-local-endpoint', version='0.9.3')
)
libraryDependencies += "com.github.brymck" % "get-local-endpoint" % "0.9.3"
[com.github.brymck/get-local-endpoint "0.9.3"]

Dependencies

compile (2)

Group / Artifact Type Version
org.jetbrains : annotations jar 15.0
org.slf4j : slf4j-api jar 1.7.25

test (5)

Group / Artifact Type Version
com.github.brymck : with-environment jar 0.9.1
org.junit.jupiter : junit-jupiter-api jar 5.5.2
org.junit.jupiter : junit-jupiter-engine jar 5.5.2
org.junit.jupiter : junit-jupiter-params jar 5.5.2
org.slf4j : slf4j-simple jar 1.7.25

Project Modules

There are no modules declared in this project.

get-local-endpoint

CircleCI codecov

get-local-endpoint is a library that allows retrieving endpoints from environment variables.

This is designed for use cases where the API endpoint is defined via environment variables, which allows decoupling of service paths from implementation.

A good example of this in action is Google's microservices demo, in particular with the frontend service, which calls the various backend services based on an environment-driven configuration.

Usage

Include this in your POM:

<dependency>
  <groupId>com.github.brymck</groupId>
  <artifactId>get-local-endpoint</artifactId>
  <version>0.9.3</version>
</dependency>

And use it as so:

String fooEndpoint = getHttpEndpoint("FOO_ADDRESS");
SomeApi api = new SomeApi(fooEndpoint);

Versions

Version
0.9.3
0.9.2
0.9.0