• Stars
    star
    1,013
  • Rank 45,397 (Top 0.9 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 9 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tiny Go server that prints os information and HTTP request to output

whoami

Docker Pulls Build Status

Tiny Go webserver that prints OS information and HTTP request to output.

Usage

Paths

/[?wait=d]

Returns the whoami information (request and network information).

The optional wait query parameter can be provided to tell the server to wait before sending the response. The duration is expected in Go's time.Duration format (e.g. /?wait=100ms to wait 100 milliseconds).

/api

Returns the whoami information as JSON.

/bench

Always return the same response (1).

/data?size=n[&unit=u]

Creates a response with a size n.

The unit of measure, if specified, accepts the following values: KB, MB, GB, TB (optional, default: bytes).

/echo

WebSocket echo.

/health

Heath check.

  • GET, HEAD, ...: returns a response with the status code defined by the POST
  • POST: changes the status code of the GET (HEAD, ...) response.

Flags

Flag Env var Description
cert Give me a certificate.
key Give me a key.
cacert Give me a CA chain, enforces mutual TLS
port WHOAMI_PORT_NUMBER Give me a port number. (default: 80)
name WHOAMI_NAME Give me a name.
verbose Enable verbose logging.

Examples

$ docker run -d -P --name iamfoo traefik/whoami

$ docker inspect --format '{{ .NetworkSettings.Ports }}'  iamfoo
map[80/tcp:[{0.0.0.0 32769}]]

$ curl "http://0.0.0.0:32769"
Hostname :  6e0030e67d6a
IP :  127.0.0.1
IP :  ::1
IP :  172.17.0.27
IP :  fe80::42:acff:fe11:1b
GET / HTTP/1.1
Host: 0.0.0.0:32769
User-Agent: curl/7.35.0
Accept: */*
# updates health check status
$ curl -X POST -d '500' http://localhost:80/health

# calls the health check
$ curl -v http://localhost:80/health
*   Trying ::1:80...
* TCP_NODELAY set
* Connected to localhost (::1) port 80 (#0)
> GET /health HTTP/1.1
> Host: localhost:80
> User-Agent: curl/7.65.3
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 500 Internal Server Error
< Date: Mon, 16 Sep 2019 22:52:40 GMT
< Content-Length: 0
docker run -d -P -v ./certs:/certs --name iamfoo traefik/whoami --cert /certs/example.cert --key /certs/example.key
version: '3.9'

services:
  whoami:
    image: traefik/whoami
    command:
       # It tells whoami to start listening on 2001 instead of 80
       - --port=2001
       - --name=iamfoo

More Repositories

1

traefik

The Cloud Native Application Proxy
Go
50,384
star
2

yaegi

Yaegi is Another Elegant Go Interpreter
Go
7,059
star
3

mesh

Traefik Mesh - Simpler Service Mesh
Go
2,027
star
4

traefik-helm-chart

Traefik Proxy Helm Chart
Smarty
1,075
star
5

mocktail

Naive code generator that creates mock implementation using testify.mock
Go
205
star
6

traefik-library-image

Used to build Official Docker image of Traefik Proxy
Dockerfile
157
star
7

traefik-migration-tool

A migration tool from Traefik v1 to Traefik v2
Go
151
star
8

plugindemo

This repository includes an example plugin, for you to use as a reference for developing your own plugins
Go
139
star
9

blog-posts

Jinja
62
star
10

plugin-rewritebody

Rewrite body is a middleware plugin for Traefik which rewrites the HTTP response body by replacing a search regex by a replacement string
Go
56
star
11

paerser

Loads configuration from many sources
Go
52
star
12

plugin-simplecache

Simple cache plugin middleware caches responses on disk
Go
47
star
13

plugin-log4shell

Log4Shell is a middleware plugin for Traefik which blocks JNDI attacks based on HTTP header values
Go
38
star
14

structor

[Messor Structor ๐Ÿœ] Manage multiple versions of a Mkdocs documentation
Go
37
star
15

faency

Faency is the Traefik Labs React component library
TypeScript
37
star
16

hub-agent-traefik

Traefik Hub agent for Traefik
Go
34
star
17

lobicornis

๐Ÿค– [Myrmica Lobicornis ๐Ÿœ] Bot: Update and Merge Pull Request
Go
27
star
18

plugin-blockpath

Block Path is a middleware plugin for Traefik which sends an HTTP 403 Forbidden response when the requested HTTP path matches one the configured regular expressions
Go
19
star
19

hub-agent-kubernetes

Traefik Hub agent for Kubernetes
Go
19
star
20

aloba

๐Ÿค– [Myrmica Aloba ๐Ÿœ] Bot: Add labels and milestone on pull requests and issues
Go
18
star
21

whoamitcp

Tiny Go server that prints os information and TCP request to output
Go
18
star
22

pluginproviderdemo

This repository includes an example provider plugin, for you to use as a reference for developing your own plugins
Go
17
star
23

mesh-helm-chart

Traefik Mesh - Helm Chart
Mustache
13
star
24

plugindemowasm

This repository includes an example wasm plugin, for you to use as a reference for developing your own plugins
Go
11
star
25

whoamiudp

Tiny Go webserver that prints os information and UDP request to output
Go
9
star
26

gallienii

๐Ÿค– [Myrmica Gallienii ๐Ÿœ] Bot: Keep Forks Synchronized
Go
8
star
27

hub-helm-chart

Traefik Hub helm chart
Smarty
6
star
28

contributors-guide

Contributors Guide
4
star
29

yaegi-talk

Talks about Yaegi
Go
4
star
30

mixtus

๐Ÿค– [Lasius Mixtus ๐Ÿœ] Bot: Publish Documentation to a GitHub Repository from another
Go
4
star
31

bibikoffi

๐Ÿค– [Myrmica Bibikoffi ๐Ÿœ] Bot: Closes stale issues
Go
4
star
32

traefik-hub-helm-chart

Traefik Hub is a Kubernetes-native API Management solution for publishing, securing, and managing APIs. Configuration is driven by Kubernetes CRDs, labels, and selectors for effective GitOps.
Makefile
4
star
33

plugindemowasm-http-call

This repository provides an example of a wasm plugin with http calls that you to use as a reference for developing your own
Go
4
star
34

kutteri

๐Ÿค– [Chalepoxenus Kutteri ๐Ÿœ] Bot: Track a GitHub repository and publish on Slack
Go
3
star
35

seo-doc

This program aims to process a documentation folder from traefik/doc and iterate each HTML file adding the requirements for a better SEO
HTML
3
star
36

traefikee-helm-chart

This chart installs the Traefik Enterprise on a Kubernetes cluster, an optional subchart of Traefik Mesh is also bundled
Smarty
3
star
37

plugin-service

Traefik Plugin Catalog backend
Go
2
star
38

hub-crds

Traefik Hub CRDs
Go
2
star
39

genconf

This repository contains a clone of the structures of the Traefik dynamic configuration
Go
2
star
40

hub

Traefik Hub Tutorials
Go
1
star
41

piceus

๐Ÿค– [Camponotus Piceus ๐Ÿœ] Browse Github for listing Traefik Plugins
Go
1
star
42

traefiklabs-header-app

This Project aims to solve the issue to have a consistent header in many sites running different frameworks.
TypeScript
1
star
43

hub-apiportal-ui

Traefik Hub's API Portal Template
CSS
1
star
44

homebrew-tap

Ruby
1
star
45

discourse-theme

Theme of Discourse Community Forum
SCSS
1
star
46

hub-static-analyzer-action

Github Action for Hub static analyzer
1
star