Documentation ¶
Index ¶
- func IsSHA(ref string) bool
- type Metrics
- type Server
- type WebhooksController
- func (o *WebhooksController) CleanupGitClientDir()
- func (o *WebhooksController) DefaultHandler(w http.ResponseWriter, r *http.Request)
- func (o *WebhooksController) HandlePollingRequests(w http.ResponseWriter, r *http.Request)
- func (o *WebhooksController) HandleWebhookRequests(w http.ResponseWriter, r *http.Request)
- func (o *WebhooksController) Health(w http.ResponseWriter, r *http.Request)
- func (o *WebhooksController) Metrics(w http.ResponseWriter, r *http.Request)
- func (o *WebhooksController) ProcessWebHook(l *logrus.Entry, webhook scm.Webhook) (*logrus.Entry, string, error)
- func (o *WebhooksController) Ready(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Metrics ¶ added in v0.0.525
type Metrics struct { WebhookCounter *prometheus.CounterVec ResponseCounter *prometheus.CounterVec }
Metrics is a set of metrics gathered by hook.
func NewMetrics ¶ added in v0.0.525
func NewMetrics() *Metrics
NewMetrics creates a new set of metrics for the hook server.
type Server ¶ added in v0.0.525
type Server struct { ClientAgent *plugins.ClientAgent Plugins *plugins.ConfigAgent ConfigAgent *config.Agent PeriodicAgent *trigger.PeriodicAgent ServerURL *url.URL TokenGenerator func() []byte Metrics *Metrics FileBrowsers *filebrowser.FileBrowsers InRepoCache *lru.Cache // contains filtered or unexported fields }
Server keeps the information required to start a server
func (*Server) CreateAgent ¶ added in v0.0.825
CreateAgent creates an agent for the given repository if the repository is configured to use in repository configuration then we create the use the repository specific configuration
type WebhooksController ¶ added in v0.0.747
type WebhooksController struct { ConfigMapWatcher *watcher.ConfigMapWatcher // contains filtered or unexported fields }
WebhooksController holds the command line arguments
func NewWebhooksController ¶ added in v0.0.747
func NewWebhooksController(path, namespace, botName, pluginFilename, configFilename string) (*WebhooksController, error)
NewWebhooksController creates and configures the controller
func (*WebhooksController) CleanupGitClientDir ¶ added in v0.0.747
func (o *WebhooksController) CleanupGitClientDir()
CleanupGitClientDir cleans up the git client's working directory
func (*WebhooksController) DefaultHandler ¶ added in v0.0.747
func (o *WebhooksController) DefaultHandler(w http.ResponseWriter, r *http.Request)
DefaultHandler responds to requests without a specific handler
func (*WebhooksController) HandlePollingRequests ¶ added in v1.1.30
func (o *WebhooksController) HandlePollingRequests(w http.ResponseWriter, r *http.Request)
HandlePollingRequests handles incoming polling events
func (*WebhooksController) HandleWebhookRequests ¶ added in v0.0.747
func (o *WebhooksController) HandleWebhookRequests(w http.ResponseWriter, r *http.Request)
HandleWebhookRequests handles incoming webhook events
func (*WebhooksController) Health ¶ added in v0.0.747
func (o *WebhooksController) Health(w http.ResponseWriter, r *http.Request)
Health returns either HTTP 204 if the service is healthy, otherwise nothing ('cos it's dead).
func (*WebhooksController) Metrics ¶ added in v0.0.885
func (o *WebhooksController) Metrics(w http.ResponseWriter, r *http.Request)
Metrics returns the prometheus metrics
func (*WebhooksController) ProcessWebHook ¶ added in v0.0.747
func (o *WebhooksController) ProcessWebHook(l *logrus.Entry, webhook scm.Webhook) (*logrus.Entry, string, error)
ProcessWebHook process a webhook
func (*WebhooksController) Ready ¶ added in v0.0.747
func (o *WebhooksController) Ready(w http.ResponseWriter, r *http.Request)
Ready returns either HTTP 204 if the service is Ready to serve requests, otherwise HTTP 503.