hook

package
v0.0.385 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	WebhookCounter  *prometheus.CounterVec
	ResponseCounter *prometheus.CounterVec
}

Metrics is a set of metrics gathered by hook.

func NewMetrics

func NewMetrics() *Metrics

NewMetrics creates a new set of metrics for the hook server.

type Server

type Server struct {
	ClientFactory      jxfactory.Factory
	MetapipelineClient metapipeline.Client
	ClientAgent        *plugins.ClientAgent
	Plugins            *plugins.ConfigAgent
	ConfigAgent        *config.Agent
	TokenGenerator     func() []byte
	Metrics            *Metrics
	// contains filtered or unexported fields
}

Server keeps the information required to start a server

func (*Server) HandleBranchEvent

func (s *Server) HandleBranchEvent(entry *logrus.Entry, hook *scm.BranchHook)

HandleBranchEvent handles a branch event

func (*Server) HandleIssueCommentEvent

func (s *Server) HandleIssueCommentEvent(l *logrus.Entry, ic scm.IssueCommentHook)

HandleIssueCommentEvent handle comment events

func (*Server) HandlePullRequestCommentEvent

func (s *Server) HandlePullRequestCommentEvent(l *logrus.Entry, pc scm.PullRequestCommentHook)

HandlePullRequestCommentEvent handles pull request comments events

func (*Server) HandlePullRequestEvent

func (s *Server) HandlePullRequestEvent(l *logrus.Entry, pr *scm.PullRequestHook)

HandlePullRequestEvent handles a pull request event

func (*Server) HandlePushEvent

func (s *Server) HandlePushEvent(l *logrus.Entry, pe *scm.PushHook)

HandlePushEvent handles a push event

Jump to

Keyboard shortcuts

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