Skip to content

Commit

Permalink
support register arbitrary http.Handler in Server
Browse files Browse the repository at this point in the history
  • Loading branch information
Mengqi Yu committed Sep 19, 2018
1 parent 79f0601 commit 356620a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/webhook/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ func (s *Server) Register(webhooks ...Webhook) error {
return s.manager.Add(s)
}

// Handle registers a http.Handler for the given pattern.
func (s *Server) Handle(pattern string, handler http.Handler) {
s.sMux.Handle(pattern, handler)
}

var _ manager.Runnable = &Server{}

// Start runs the server if s.Dryrun is false.
Expand Down

0 comments on commit 356620a

Please sign in to comment.