server

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: 0BSD Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPushWebhook

func NewPushWebhook(id string, subs []chan events.PushData, ph events.PayloadHandler) http.Handler

func NewSubscriber

func NewSubscriber(id string, bot repoBot, renderer krm.Renderer, messenger commitMessenger, delay time.Duration) chan events.PushData

func RequireHeaders

func RequireHeaders(headers []config.Header, handler http.Handler) http.Handler

func WatchConfigOrDie

func WatchConfigOrDie(path string, onChange func(c *config.NormalizedConfig))

func WithK8sChain

func WithK8sChain(o *Options)

Types

type Option

type Option func(*Options)

func WithConfig

func WithConfig(c *config.NormalizedConfig) Option

func WithConfigPath

func WithConfigPath(path string) Option

func WithDataPath

func WithDataPath(path string) Option

func WithDebounce added in v0.2.1

func WithDebounce(d time.Duration) Option

func WithDefaultRegistry

func WithDefaultRegistry(registry string) Option

func WithImagerefTemplate

func WithImagerefTemplate(t string) Option

func WithMuxGenerator

func WithMuxGenerator(g muxGenerator) Option

func WithWatch

func WithWatch(enabled bool) Option

type Options

type Options struct {
	Watch       bool
	ConfigPath  string
	Config      *config.NormalizedConfig
	Datapath    string
	UseK8sChain bool
	// contains filtered or unexported fields
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewOrDie

func NewOrDie(options ...Option) *Server

func (*Server) Reload

func (s *Server) Reload(handler http.Handler)

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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