Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Logger ¶
func Logger(_ echo.Context, v middleware.RequestLoggerValues) error
func NewMetricsServer ¶ added in v0.7.0
func NewMetricsServer(addr string) (*http.Server, func(next echo.HandlerFunc) echo.HandlerFunc)
func NewProbeServer ¶ added in v0.7.0
Types ¶
type Config ¶
type Config struct {
ListenAddr string
Logger zerolog.Logger
MetricsAddr string
Platform platforms.Platform
ProbeAddr string
WebhookSecret string
Workers int
}
Config hold configuration to run a server
type Server ¶
type Server struct {
CancelWorker chan struct{}
Config *Config
MainServer *http.Server
MetricsServer *http.Server
ProbeServer *http.Server
WorkerPool *workers.WorkerPool
}
Server hold a server instance
type WebhookHandler ¶
type WebhookHandler struct {
JobQueue chan *workers.Job
Platform platforms.Platform
WebhookSecret string
}
WebhookHandler hold webhook configuration
func NewWebhookHandler ¶
func NewWebhookHandler(platform platforms.Platform, webhookSecret string, jobQueue chan *workers.Job) *WebhookHandler
NewWebhookHandler returns an instance of WebhookHandler
func (*WebhookHandler) GithubHandler ¶
func (h *WebhookHandler) GithubHandler(c echo.Context) error
func (*WebhookHandler) GitlabHandler ¶
func (h *WebhookHandler) GitlabHandler(c echo.Context) error
GitlabHandler handle Gitlab webhook requests
Click to show internal directories.
Click to hide internal directories.