status

command module
v1.25.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 3 Imported by: 0

README

CircleCI Coverage Status

Status

This is just an alternative to using https://httpstat.us/

Background

As the alternative suffers from stability reason, I wanted to stop using it.

Why a service?

The service is needed for testing.

Server

Below we outline all the endpoints:

Status Code

Allows to set the status code of the response.

Request
GET /v1/status/{code}

[!NOTE] code is a number, e.g 200, 400, etc.

Parameter Description
sleep The duration to sleep please check out https://pkg.go.dev/time#ParseDuration
Response

The status with a description as text.

Example:

200 OK

Health

The system defines a way to monitor all of it's dependencies.

To configure we just need the have the following configuration:

health:
  duration: 1s (how often to check)
  timeout: 1s (when we should timeout the check)

Deployment

Since we are advocating building microservices, you would normally use a container orchestration system.

Development

If you would like to contribute, here is how you can get started.

Structure

The project follows the structure in golang-standards/project-layout.

Dependencies

Please make sure that you have the following installed:

Style

This project favours the Uber Go Style Guide

Setup

The get yourself setup, please run the following:

make setup
Binaries

To make sure everything compiles for the app, please run the following:

make build-test
Features

To run all the features, please run the following:

make features
Changes

To see what has changed, please have a look at CHANGELOG.md

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
server
v1

Jump to

Keyboard shortcuts

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