-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
34b1275
commit bb14dc6
Showing
1 changed file
with
35 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
# statsd | ||
|
||
*[Statsd](https://github.com/etsy/statsd) client library in golang.* | ||
*[Statsd](https://github.com/etsy/statsd) Go client library* | ||
|
||
[![Master Build Status](https://secure.travis-ci.org/tecnickcom/statsd.png?branch=master)](https://travis-ci.org/tecnickcom/statsd?branch=master) | ||
[![Master Coverage Status](https://coveralls.io/repos/tecnickcom/statsd/badge.svg?branch=master&service=github)](https://coveralls.io/github/tecnickcom/statsd?branch=master) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/tecnickcom/statsd)](https://goreportcard.com/report/github.com/tecnickcom/statsd) | ||
[![GoDoc](https://godoc.org/github.com/tecnickcom/statsd?status.svg)](https://godoc.org/github.com/tecnickcom/statsd) | ||
This project has been originally forked and extended from https://github.com/alexcesaro/statsd | ||
|
||
* **category** Library | ||
* **author** Alexandre Cesaro, Nicola Asuni <[email protected]> | ||
* **copyright** 2015 Alexandre Cesaro, 2016 Nicola Asuni - Tecnick.com | ||
* **license** MIT (see LICENSE) | ||
* **link** https://github.com/tecnickcom/statsd | ||
* **docs** https://godoc.org/github.com/tecnickcom/statsd | ||
This package is a simple and efficient StatsD client. | ||
StatsD is a network daemon that listens for statistics and aggregates them to one or more pluggable backend services (e.g., Graphite). | ||
For more information about StatsD, visit the StatsD homepage: https://github.com/etsy/statsd | ||
|
||
The packages documentation is available at: [https://pkg.go.dev/github.com/tecnickcom/statsd](https://pkg.go.dev/github.com/tecnickcom/statsd) | ||
|
||
## Description | ||
|
||
statsd is a simple and efficient golang [Statsd](https://github.com/etsy/statsd) client. | ||
[![Go Reference](https://pkg.go.dev/badge/github.com/tecnickcom/statsd.svg)](https://pkg.go.dev/github.com/tecnickcom/statsd) | ||
[![check](https://github.com/tecnickcom/statsd/actions/workflows/check.yaml/badge.svg)](https://github.com/tecnickcom/statsd/actions/workflows/check.yaml) | ||
[![Coverage Status](https://coveralls.io/repos/github/tecnickcom/statsd/badge.svg?branch=main)](https://coveralls.io/github/tecnickcom/statsd?branch=main) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/tecnickcom/statsd)](https://goreportcard.com/report/github.com/tecnickcom/statsd) | ||
|
||
* **category** Library | ||
* **license** [MIT](https://github.com/tecnickcom/statsd/blob/main/LICENSE) | ||
* **link** https://github.com/tecnickcom/statsd | ||
|
||
This project has been forked and extended from https://github.com/alexcesaro/statsd | ||
----------------------------------------------------------------- | ||
|
||
|
||
## Features | ||
|
@@ -31,97 +32,41 @@ This project has been forked and extended from https://github.com/alexcesaro/sta | |
- Simple and clean API | ||
- 100% test coverage | ||
|
||
----------------------------------------------------------------- | ||
|
||
## Download | ||
|
||
``` | ||
go get github.com/tecnickcom/statsd | ||
``` | ||
|
||
## Quick Start | ||
|
||
This project includes a Makefile that allows you to test and build the project in a Linux-compatible system with simple commands. | ||
All the artifacts and reports produced using this Makefile are stored in the *target* folder. | ||
|
||
To see all available options: | ||
``` | ||
make help | ||
``` | ||
<a name="quickstart"></a> | ||
## Developers' Quick Start | ||
|
||
To test the project inside a Docker container (requires Docker): | ||
``` | ||
make dbuild | ||
``` | ||
To quickly get started with this project, follow these steps: | ||
|
||
An arbitrary make target can be executed inside a Docker container by specifying the "MAKETARGET" parameter: | ||
``` | ||
MAKETARGET='qa' make dbuild | ||
``` | ||
The list of make targets can be obtained by typing ```make``` | ||
1. Ensure you have installed the latest Go version. | ||
1. Clone the repository: `git clone https://github.com/tecnickcom/statsd.git`. | ||
2. Change into the project directory: `cd statsd`. | ||
3. Install the required dependencies and test everything: `DEVMODE=LOCAL make x`. | ||
|
||
Now you are ready to start developing with statsd! | ||
|
||
The base Docker building environment is defined in the following Dockerfile: | ||
``` | ||
resources/DockerDev/Dockerfile | ||
``` | ||
This project includes a *Makefile* that allows you to test and build the project in a Linux-compatible system with simple commands. | ||
All the artifacts and reports produced using this *Makefile* are stored in the *target* folder. | ||
|
||
To execute all the default test builds and generate reports in the current environment: | ||
``` | ||
make qa | ||
``` | ||
Alternatively, everything can be built inside a [Docker](https://www.docker.com) container using the command `make dbuild` that uses the environment defined at `resources/docker/Dockerfile.dev`. | ||
|
||
To format the code (please use this command before submitting any pull request): | ||
``` | ||
make format | ||
``` | ||
|
||
## Useful Docker commands | ||
|
||
To manually create the container you can execute: | ||
``` | ||
docker build --tag="tecnickcom/statsddev" . | ||
``` | ||
|
||
To log into the newly created container: | ||
``` | ||
docker run -t -i tecnickcom/statsddev /bin/bash | ||
``` | ||
|
||
To get the container ID: | ||
``` | ||
CONTAINER_ID=`docker ps -a | grep tecnickcom/statsddev | cut -c1-12` | ||
``` | ||
|
||
To delete the newly created docker container: | ||
``` | ||
docker rm -f $CONTAINER_ID | ||
``` | ||
|
||
To delete the docker image: | ||
``` | ||
docker rmi -f tecnickcom/statsddev | ||
``` | ||
|
||
To delete all containers | ||
``` | ||
docker rm $(docker ps -a -q) | ||
To see all available options: | ||
```bash | ||
make help | ||
``` | ||
|
||
To delete all images | ||
``` | ||
docker rmi $(docker images -q) | ||
``` | ||
----------------------------------------------------------------- | ||
|
||
<a name="runtest"></a> | ||
## Running all tests | ||
|
||
Before committing the code, please check if it passes all tests using | ||
Before committing the code, please format it and check if it passes all tests using | ||
```bash | ||
make qa | ||
DEVMODE=LOCAL make x | ||
``` | ||
|
||
Other make options are available install this library globally and build RPM and DEB packages. | ||
Please check all the available options using `make help`. | ||
|
||
----------------------------------------------------------------- | ||
|
||
## Example | ||
``` | ||
|