Sign inSign up

barito/barito-router

By barito

•Updated over 5 years ago

Route from outside world to barito world Topics Resources

Image
0

6.1K

barito/barito-router repository overview

⁠Barito Router

alt

Route incoming request from outside to Barito world. Configurable to use gRPC and REST API. The REST API is run automatically by calling grpc-gateway which is set in barito-flow.

Barito router consists of 2 routers; producer router and Kibana router.

producer router is responsible to retract profile from barito market based on request header, to be used as basic information to call the right barito flow client, so timber can arrive to the right app group. Keep note that the incoming request to barito router producer is REST and will be converted to protobuf just before calling barito flow produce API.

Kibana router responsible to create Kibana reserve proxy to serve the request. For now, Kibana router still uses REST fully as barito market have not yet converged to gRPC.

⁠Setup Development

cd $GOPATH/src/github.com/BaritoLog/barito-router
git clone [email protected]:BaritoLog/barito-router.git

cd barito-router
go build
./barito-router

or

go get github.com/BaritoLog/barito-router
$GOPATH/bin/barito-router
⁠Env
NameDescriptionDefault Value
BARITO_PRODUCER_ROUTERAddress that router listen and serve:8081
BARITO_KIBANA_ROUTERAddress that kibana router listen and serve:8082
BARITO_MARKET_URLURL of market APIhttp://localhost:3000⁠
BARITO_MARKET_ACCESS_TOKENAccess token for market API-
BARITO_PROFILE_API_PATHapi path to get app profile by secret/api/profile
BARITO_PROFILE_API_BY_APP_GROUP_PATHapi path to get app profile by app group secret/api/profile_by_app_group
BARITO_AUTHORIZE_API_PATHapi path to authorization/api/authorize
BARITO_PROFILE_API_BY_CLUSTERNAME_PATHapi path to get app profile by cluster name/api/v2/profile_by_cluster_name
BARITO_CAS_ADDRESSAddress for authentication and authorisation kibana router-
BARITO_NEW_RELIC_APP_NAMECurrent app namebarito_router
BARITO_NEW_RELIC_LICENSE_KEYLicense key for kibana router-
BARITO_NEW_RELIC_ENABLEDEnabled controls whether the agent will communicate with the New Relic servers and spawn goroutinesfalse
⁠API Producer Router
  • POST /ping

    For sending ping to the server

  • POST /produce_batch

    For sending log entries to be produced on batch by calling barito-flow ProduceBatch API

  • POST /

    For sending log entries to be produced individually by calling barito-flow Produce API

⁠API Kibana Router
  • POST /ping

    For sending ping to the server

  • POST /logout

    for logging out kibana server

  • POST /

    create reverse proxy and serve request

Tag summary

Content type

Image

Digest

Size

40.2 MB

Last updated

over 5 years ago

docker pull barito/barito-router:v0.7.4