server

package
v0.0.0-...-b8d8a1a Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2015 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const ROUTE = "/{user:.*}/{name:.*}/"

Variables

This section is empty.

Functions

func New

func New(producer *nsq.Producer, secret string, logger *logrus.Logger) http.Handler

New returns a new http.Handler that handles github webhooks from the github API. After receiving a hook the handler will push the message onto the specified NSQ Queue.

producer is the connection to the NSQD instance. secret is the secret provided when you register the webhook in the github UI. logger is the standard logger for the application

Types

type Server

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

Server handles github webhooks and pushes the messages onto a specified queue under the repositories. The queue name will the be repository name prepended with hoosk-{reponame}

func (*Server) ServeHTTP

func (h *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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