Skip to content

square/grange-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grange-server

A read-only range server frontend to grange. See there for documentation of concepts and query language.

Cluster and group data is specified in YAML files.

Installation

  1. Setup your go environment if needed

     mkdir $HOME/go
     export GOPATH=$HOME/go
    
  2. Install grange-server and erg client

     go get -v -u github.com/square/grange-server
     go get -v -u github.com/square/erg
    

Usage

Put some range YAML files in clusters/, then:

$GOPATH/bin/grange-server --port=8888 $GOPATH/src/github.com/square/grange-server/grange.gcfg

Simple expansion (with erg client):

erg -v 1..2

Find all clusters that have type key set to "mysql":

erg -v '%{has(TYPE;mysql)}'

Features

  • Read-only serving of cluster YAML files on disk.
  • -parse option to dry-run parse source files and not start the server. Will return non-zero exit code if any warnings were emitted.
  • Reloads configuration file in response to HUP signal. Allows dynamic log level and cluster changes.
  • Can report HTTP response metrics to statsd.

Format

See the clusters directory for sample YAML files. At minimum, your directory should contain a GROUPS.yaml. See grange.gcfg for a sample configuration.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages