GithubHelp home page GithubHelp logo

bapteme's Introduction

bapteme

Build Status Go Report Card Go Walker

Description

bapteme is a go http server who can be used to named server with a random name.

Use case

Bapteme is mainly used in conjonction with "static" deployment script (preseed, bash, chef, puppet, whatever).

Usage

Server

$ ./bapteme -h
Usage of ./bapteme:
  -bind="": Address to bind. Format IP:PORT
  -d=false: turn on debug info
  -size=10: Default final hostname size

Client

HTTP Parameter Description default
size size of hostname size server command line option
prefix prefix to add on hostname if User-Agent:
win for windows
lin for linux
else srv
instance service to add after prefix
id Unique identifier to generate same hostname
Can be MAC address etc.

Example

Server

$ ./bapteme -bind="127.0.0.1:8086" -size="15"
2014/08/28 16:32:41 INFO Bind to 127.0.0.1:8086

Client

$ curl -X GET 'http://127.0.0.1:8086?size=42'
srvIuKHEt3Kg5ES88kWx8WDCplhzvBM2xEkfRWcNXE
$ curl -X GET 'http://127.0.0.1:8086?size=42'
srvBzi2mhH6y4fKOWXEH9v7EwpYMM4NesXPHY1tseW
$ curl -X GET 'http://127.0.0.1:8086?prefix=rhel&instance=bind&id=01:02:03:04:05:06'
rhelbindMDE6MDI
$ curl -X GET 'http://127.0.0.1:8086?prefix=rhel&instance=bind&id=01:02:03:04:05:06'
rhelbindMDE6MDI
$ curl -X GET 'http://127.0.0.1:8086?prefix=AZERTY&size=2'
name too long
# HTTP 500
# len(AZERTY) >> 2

bapteme's People

Contributors

guilhem avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.