hook

package
v0.0.0-...-8f1101b Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

View Source
const FailedCommentCoerceFmt = "Could not coerce %s event to a GenericCommentEvent. Unknown 'action': %q."

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	ClientAgent    *plugins.ClientAgent
	Plugins        *plugins.ConfigAgent
	ConfigAgent    *config.Agent
	TokenGenerator func() []byte
	Metrics        *githubeventserver.Metrics
	RepoEnabled    func(org, repo string) bool
	// contains filtered or unexported fields
}

Server implements http.Handler. It validates incoming GitHub webhooks and then dispatches them to the appropriate plugins.

func (*Server) GracefulShutdown

func (s *Server) GracefulShutdown()

GracefulShutdown implements a graceful shutdown protocol. It handles all requests sent before receiving the shutdown signal.

func (*Server) ServeHTTP

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

ServeHTTP validates an incoming webhook and puts it into the event channel.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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