Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Serving func(router *mux.Router) error
Serving is the function which starts the server
View Source
var Shutdown func() error
Shutdown is the function which stops the server
View Source
var StopChannel = make(chan os.Signal, 1)
StopChannel is the channel which is used to stop the server
Functions ¶
func DefaultServing ¶
DefaultServing is the default server
func SetupRouter ¶
func SetupRouter(variant, versionTag, configInfo string, matchStore matches.Matchstore, kvStore kvstore.Storage)
SetupRouter sets up the router with the given configuration, allows to control the server start
Types ¶
type BasicConfiguration ¶
type BasicConfiguration struct { LoglevelAPI string `default:"INFO" split_words:"true"` LoglevelMock string `default:"INFO" split_words:"true"` MockPort int `default:"8081" split_words:"true"` MockDir string `default:"." split_words:"true"` MockFilepattern string `default:"*-mock.*" split_words:"true"` MatchesCapacity int `default:"1000" split_words:"true"` APIPathPrefix string `default:"/__" split_words:"true"` APIUsername string `default:"mockgo" split_words:"true"` APIPassword string `default:"password" split_words:"true"` }
BasicConfiguration is the basic configuration model of the server which is defined via environment variables
var BasicConfig *BasicConfiguration
BasicConfig is the basic mock configuration
func (*BasicConfiguration) Info ¶
func (c *BasicConfiguration) Info() string
Info returns a string with the configuration info
type RequestHandler ¶
RequestHandler abstraction of a set of http handler funcs
Click to show internal directories.
Click to hide internal directories.