Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // VersionString is the git description set via ldflags VersionString string // RevisionString is the git revision set via ldflags RevisionString string // BuildTags are the tags used at build time set via ldflags BuildTags string )
Functions ¶
func NewServer ¶
func NewServer(basicAuthStr string, cfg *HandlerConfig) (*martini.ClassicMartini, error)
NewServer builds a martini.ClassicMartini instance given a HandlerConfig
func ServerMain ¶
func ServerMain(c *serverSetupContext) int
ServerMain is the `main` entry point used by the `hookworm-server` executable
Types ¶
type Handler ¶
type Handler interface {
HandleGithubPayload(string) (string, error)
HandleTravisPayload(string) (string, error)
SetNextHandler(Handler)
NextHandler() Handler
}
Handler is the interface each pipeline handler must fulfill
func NewHandlerPipeline ¶
func NewHandlerPipeline(cfg *HandlerConfig) (Handler, error)
NewHandlerPipeline constructs a linked-list-like pipeline of handlers, each responsible for passing control to the next if deemed appropriate.
type HandlerConfig ¶
type HandlerConfig struct {
Debug bool `json:"debug"`
GithubPath string `json:"github_path"`
ServerAddress string `json:"server_address"`
ServerPidFile string `json:"server_pid_file"`
StaticDir string `json:"static_dir"`
TravisPath string `json:"travis_path"`
WorkingDir string `json:"working_dir"`
WormDir string `json:"worm_dir"`
WormTimeout int `json:"worm_timeout"`
WormFlags *wormFlagMap `json:"worm_flags"`
Version string `json:"version"`
}
HandlerConfig contains the bag of configuration poo used by all handlers
Source Files
¶
Click to show internal directories.
Click to hide internal directories.
