cmd

package
v0.0.0-...-6821e7c Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigPath

func ConfigPath() []string

func Execute

func Execute()

func NewRoot

func NewRoot() *cobra.Command

NewRoot returns a newly initialized cobra.Command object that implements the Command interface.

func WelkomText

func WelkomText() string

Types

type HTTPCmd

type HTTPCmd interface {
	GetBaseCmd() *cobra.Command
	// contains filtered or unexported methods
}

func NewHTTPCmd

func NewHTTPCmd(
	configuration *configs.Config,
) HTTPCmd

New Object HTTP Command

func NewHTTPCmdSignaled

func NewHTTPCmdSignaled(
	configuration *configs.Config,
	stop <-chan bool,
) HTTPCmd

New Object HTTP Command

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server warps http.Server.

func StartWebServer

func StartWebServer(addr url.URL, readTimeout, writeTimeout int, handler http.Handler) *Server

StartWebServer starts a web server

func (*Server) Stop

func (srv *Server) Stop()

Stop stops the server. Useful for testing.

func (*Server) StopNotify

func (srv *Server) StopNotify() <-chan struct{}

StopNotify returns receive-only stop channel to notify the server has stopped.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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