Categorygithub.com/didip/mcrouter-hub
modulepackage
0.1.0
Repository: https://github.com/didip/mcrouter-hub.git
Documentation: pkg.go.dev

# README

GoDoc license

mcrouter-hub

An HTTP companion to Facebook's McRouter. It performs CRUD operation on McRouter config JSON.

The daemon has 2 mode: agent and central.

While in agent mode, and if central URL is provided, mcrouter-hub gathers configuration data and reports it to central.

Here's how to run the agent mode:

MCROUTER_CONFIG_FILE=./tests/mcrouter.json MCRHUB_CENTRAL_URL=http://localhost:5002 /path/to/mcrouter-hub

While in central mode, mcrouter-hub receives configuration data from individual McRouter host and performs CRUD operations on them.

Here's how to run the central mode:

/path/to/mcrouter-hub

Environment Variables

mcrouter-hub uses environment variables as configuration:

  • MCROUTER_CONFIG_FILE: Path McRouter config file (Required).

  • MCRHUB_CENTRAL_URL: URL to mcrouter-hub central. Default: ""

  • MCRHUB_LOG_LEVEL: Log level. Default: "info"

  • MCRHUB_ADDR: The HTTP server host and port. Default: Agent: ":5001", Central: ":5002"

  • MCRHUB_CERT_FILE: Path to cert file. Default: ""

  • MCRHUB_KEY_FILE: Path to key file. Default: ""

# Packages

No description provided by the author
No description provided by the author
Package libhttp provides http related library functions.
Package middlewares provides common middleware handlers.
No description provided by the author
No description provided by the author