abraracourcix

module
v0.0.0-...-3361740 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: Apache-2.0

README

Abraracourcix

License Apache 2 GitHub version

Master :

  • Circle CI

Develop :

  • Circle CI

This tool is a simple URL Shortener written in Golang (Require 1.8) Abraracourcix uses gRPC for its message protocol.

The project includes 2 command line utilities:

  • abraracourcixctl, to communicate with a server abraracourcixd
  • abraracourcixadm, an administration tool to manage the server.

For gRPC-supported languages, Abraracourcix provides a JSON gateway, which provides a RESTful proxy that translates HTTP / JSON requests to gRPC messages.

Metrics for Prometheus are exported.

Application traces are available using OpenTracing. Supported systems are:

Storage backends are :

Installation

You can download the binaries :

Abraracourcixd
Abraracourcixctl
Abraracourcixadm

Usage

Launch Zipkin with Docker, and open a browser on 9411:

$ docker run -d -p 9411:9411 openzipkin/zipkin

or Jaeger with Docker (open a browser on 16686):

$ docker run -d -p5775:5775/udp -p16686:16686 jaegertracing/all-in-one:latest

Use the abraracourcixd CLI to launch a server:

$ abraracourcixd run --config abraracourcix.toml -v 2 --alsologtostderr

Configure CLI:

$ export ABRARACOURCIX_SERVER="localhost:8080"
$ export ABRARACOURCIX_USERNAME="admin"
$ export ABRARACOURCIX_APIKEY="nimda"

Use the abraracourcixctl CLI to use the URLs informations :

$ abraracourcixctl url list
URLs:
$ abraracourcixctl url add --link https://news.google.fr/
URL:
- Key: 5X81VNCDVq
- Link: https://news.google.fr/
- Date: 2017-06-13 17:08:48.898220331 +0200 CEST
$ abraracourcixctl url list
URLs:
- 5X81VNCDVq
$ abraracourcixctl url get --key 5X81VNCDVq
URL:
- Key: 5X81VNCDVq
- Link: https://news.google.fr/
- Date: 2017-06-13 17:08:48.898220331 +0200 CEST

Use the abraracourcixadm CLI to manage the server.

$ abraracourcixadm health
+------------+--------+---------+
|  SERVICE   | STATUS |  TEXT   |
+------------+--------+---------+
| UrlService | OK     | SERVING |
+------------+--------+---------+

$ abraracourcixadm info
+----------------+----------------+---------+--------+
|    SERVICE     |      URI       | VERSION | STATUS |
+----------------+----------------+---------+--------+
| abraracourcixd | localhost:8080 | 2.0.0   | OK     |
+----------------+----------------+---------+--------+

You could explore the API using Swagger UI :

http://localhost:9090/swagger-ui/

Development

  • Initialize environment

      $ make init
    
  • Build tool :

      $ make build
    
  • Start backends :

      $ docker run -d -p 6379:6379 --name redis redis:3
      $ docker run -d -p 27017:27017 --name mongo mongo:3.1
    
  • Launch unit tests :

      $ make test
    

Contributing

See CONTRIBUTING.

License

See LICENSE for the complete license.

Changelog

A changelog is available

Contact

Nicolas Lamirault nicolas.lamirault@gmail.com

Directories

Path Synopsis
Package api contains the REST and gRPC API.
Package api contains the REST and gRPC API.
Package auth provides authentication method
Package auth provides authentication method
cmd
Package config contains the configuration used by the server
Package config contains the configuration used by the server
pb
Package pb contains the protocol buffer descriptions
Package pb contains the protocol buffer descriptions
health
Package health is a generated protocol buffer package.
Package health is a generated protocol buffer package.
info
Package info is a generated protocol buffer package.
Package info is a generated protocol buffer package.
v2beta
Package v2beta is a generated protocol buffer package.
Package v2beta is a generated protocol buffer package.
pkg
rbac
Package rbac provides a lightweight role-based access control
Package rbac provides a lightweight role-based access control
server
mem
Package tracing provides support for request tracing mechanisms.
Package tracing provides support for request tracing mechanisms.
zipkin
Package zipkin provides support for opentracing Zipkin framework.
Package zipkin provides support for opentracing Zipkin framework.

Jump to

Keyboard shortcuts

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