hatbox

command module
v0.0.0-...-ea85266 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 10 Imported by: 0

README

hatbox

Description

Hatbox is a scalable and self syncing CDN. All files in the contents folder will be kept synchronized with other hatboxs in the namespace. When a new hatbox is introduced with no files it'll be automatically populated by the rest of the cluster.

Runtime params

  • cluster-name - name of cluster
  • hatbox-name - name of the hatbox
  • redis-address - address to redis server
  • redis-password - password for redis server
  • run-now - run registered scripts on this wart immediately
  • host-port - port to host file server on
  • health-port - port to host health server on

Getting dependencies

Requires a version of go that supports go.mod

  • go get

Get up and running

  • Build it
    • make build
  • Build and run it
    • make run
  • You can get started using an example config as such
    • ./bin/hatbox --config hatbox.config
  • Or you can pass in through runtime params
    • ./bin/hatbox --redis-address=<address> --redis-password=<password> --hatbox-name=hatbox
  • Or run through a docker container
    • docker run jaeg/hatbox:latest --redis-address=<address> --redis-password=<password> --hatbox-name=hatbox

Routes

GET /< filepath >

  • Returns the newest version of the requested file. If the hatbox that got asked for the file either doesn't have it or is out of date it syncs the file.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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