graph-query-api

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 18 Imported by: 0

README

graph-query-api

Should be the same as the github repo name but it isn't always.

Circle CIGo Report Card Coverage Status

Introduction

What is this service and what is it for? What other services does it depend on

UPP Golang Microservice Template short description - please amend

Installation

How can I install it

Download the source code, dependencies and test dependencies:

    curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
    go get -u github.com/Financial-Times/graph-query-api
    cd $GOPATH/src/github.com/Financial-Times/graph-query-api
    dep ensure
    go build .

Running locally

How can I run it

  1. Run the tests and install the binary:

     dep ensure
     go test -race ./...
     go install
    
  2. Run the binary (using the help flag to see the available optional arguments):

     $GOPATH/bin/graph-query-api [--help]
    

Options:

    --app-system-code="graph-query-api"            System Code of the application ($APP_SYSTEM_CODE)
    --app-name="graph-query-api"                   Application name ($APP_NAME)
    --port="8080"                                           Port to listen on ($APP_PORT)

Build and deployment

How can I build and deploy it (lots of this will be links out as the steps will be common)

Service endpoints

What are the endpoints offered by the service

e.g.

GET

Using curl:

curl http://localhost:8080/_<INSERT SEPCIFIC URL HERE>_| json_pp`

Explain what the response should represent

Based on the following [google doc]()

Utility endpoints

Endpoints that are there for support or testing, e.g read endpoints on the writers

Healthchecks

Admin endpoints are:

/__gtg

/__health

/__build-info

These standard endpoints do not need to be specifically documented.

This section should however explain what checks are done to determine health and gtg status.

There are several checks performed:

e.g.

  • Checks that a connection can be made to Neo4j, using the neo4j url supplied as a parameter in service startup.

Other information

Anything else you want to add.

e.g. (NB: this example may be something we want to extract as it's probably common to a lot of services)

Logging
  • The application uses logrus; the log file is initialised in main.go.
  • Logging requires an env app parameter, for all environments other than local logs are written to file.
  • When running locally, logs are written to console. If you want to log locally to file, you need to pass in an env parameter that is != local.
  • NOTE: /__build-info and /__gtg endpoints are not logged as they are called every second from varnish/vulcand and this information is not needed in logs/splunk.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL