hippo

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2019 License: MIT Imports: 9 Imported by: 4

README

Hippo

Hippo Server is an easy, fast, lightweight server framework. He loves eating data.

Hippo

Documentation

Overview

Hippo is an easy, fast, lightweight server framework.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorRequiredOption    = errors.New("required option")
	ErrorInvalidTimeFormat = errors.New("invalid time format")
	ErrorInvalidDataFormat = errors.New("invalid data format")
	ErrorDirectoryNotFound = errors.New("directory not found")
)

Functions

func EnsureDir

func EnsureDir(dir string) error

func InitLogger

func InitLogger(dir, name string, debug, verbose bool) error

func Usage

func Usage(fs *pflag.FlagSet, description, version string) func()

func WaitForSignals

func WaitForSignals()

Types

type Config

type Config struct {
	Name        string
	DisplayName string
	Description string
	Version     string
	Debug       bool
	IsService   bool
	Verbose     bool
}

Hippo configuration struct

type Engine

type Engine struct {
	WorkingDir string

	Config *Config
	// contains filtered or unexported fields
}

Engine supports engine framework.

func NewEngine

func NewEngine(server Server, config *Config) *Engine

NewEngine allocates a new server to engine.

func (*Engine) Start

func (e *Engine) Start() error

Start starts server and opens error channel.

func (*Engine) Stop

func (e *Engine) Stop() error

Stop stops engine.

type Server

type Server interface {
	Start() error
	Stop() error
	SetEngine(e *Engine)
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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