Sign inSign up

pablobastidasv/transmitter

By pablobastidasv

•Updated almost 7 years ago

Java Springboot service to resend request to another service for testing and presentation purposes.

Image
0

317

pablobastidasv/transmitter repository overview

⁠Mesh Service

This simplistic service helps to exemplify how istio⁠ service mesh works.

This service as one endpoint (/hello), this endpoint does a request to a url provided via the environment variable upstreamUrl (http://time.jsontest.com by default) and the response is a text/plain which contains the serviceName environment value the request destination and the response.

backend -> http://time.jsontest.com/
{
   "date": "10-15-2019",
   "milliseconds_since_epoch": 1571148446016,
   "time": "02:07:26 PM"
}

⁠Test features

⁠Random fail

This service comes with an option to response with a an http status 500.

This is possible with the header fail and a number less than 100 which indicates the percentage of probability to get the error status, below example shows a query with a probability of 40% to obtain a 500 status response.

curl -H'fail:40' http://localhost:8080/hello
⁠Specifying downstream URL

This service will call an specified URL, if there is not a specified URL the query will go to http://time.jsontest.com.

To specify a URL use the environment variable upstreamUrl.

⁠Service name

By default the service name is test-svc and this will part of the response.

This name can be changed via the environment variable serviceName.

⁠Send request headers to called service

For test proposes, a header can be resend from the request to the "downstream" service, by default the header bypassed are fail and version.

This header can be customized via the environment variable passthroughsHeaders, this value is a list of header separated by comma.

Tag summary

Content type

Image

Digest

Size

119.6 MB

Last updated

almost 7 years ago

docker pull pablobastidasv/transmitter