Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // MetricsRegisterer is the registry that this service's metrics will be collected // by. Overwrite it to use a different registry. MetricsRegisterer = prometheus.DefaultRegisterer // MetricsGatherer is the registry that this service's metrics will be collected // by. Overwrite it to use a different registry. MetricsGatherer = prometheus.DefaultGatherer )
Functions ¶
This section is empty.
Types ¶
type HookHandler ¶
HookHandler - A function that will be executed by the callback.
Payload is provided as []byte, and can be parsed with github.ParseWebHook if desired
type Responder ¶
type Responder struct {
// contains filtered or unexported fields
}
Responder -
func New ¶
func New(repos []string, domain string, actions ...HookHandler) (*Responder, error)
New -
func (*Responder) Register ¶
Register a new webhook with the watched repositories for the listed events. A cleanup function is returned when the hook is successfully registered - this function must be called (usually deferred), otherwise invalid webhooks will be left behind.
func (*Responder) RegisterAndListen ¶
RegisterAndListen - unlike calling `Register` and `Listen` separately, this will block while waiting for the context to be cancelled.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
github-responder
The github-responder command
|
The github-responder command |
Click to show internal directories.
Click to hide internal directories.