Skip to content

Commit

Permalink
Merge pull request #152 from mengqiy/arbitraty_http_handler
Browse files Browse the repository at this point in the history
support register arbitrary http.Handler in Server
  • Loading branch information
k8s-ci-robot committed Sep 19, 2018
2 parents 0f4719b + 356620a commit 5373e8e
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 5373e8e

Please sign in to comment.