gnocker

package
v0.0.0-...-95785cc Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// ConfigSelectHeader is the constant for the head you pass if you need to overload paths/methods
	ConfigSelectHeader = "X-GNOCK-CONFIG"
)

Variables

This section is empty.

Functions

func New

func New(options ...Option) *gnocker

New returns a new gnocker with a default setup of up app and config on 127.0.0.1 on ports 8080 & 8081

Types

type Option

type Option func(c *config)

Option is a function that can modify a default config

func WithConfigBasePath

func WithConfigBasePath(basePath string) Option

WithConfigBasePath sets the base path to post and look up configurations

func WithHost

func WithHost(host string) Option

WithHost sets the host

func WithLogger

func WithLogger(l logrus.FieldLogger) Option

WithLogger overrides the default logger

func WithPort

func WithPort(port int) Option

WithPort sets the main app's port

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳