gerrit

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventListener

type EventListener struct {
	EventSourceName   string
	EventName         string
	GerritEventSource v1alpha1.GerritEventSource
	Metrics           *metrics.Metrics
}

EventListener implements ConfigExecutor

func (*EventListener) GetEventName

func (el *EventListener) GetEventName() string

GetEventName returns name of event

func (*EventListener) GetEventSourceName

func (el *EventListener) GetEventSourceName() string

GetEventSourceName returns name of event source

func (*EventListener) GetEventSourceType

func (el *EventListener) GetEventSourceType() apiCommon.EventSourceType

GetEventSourceType return type of event server

func (*EventListener) StartListening

func (el *EventListener) StartListening(ctx context.Context, dispatch func([]byte, ...eventsourcecommon.Option) error) error

StartListening starts an event source

func (*EventListener) ValidateEventSource

func (listener *EventListener) ValidateEventSource(ctx context.Context) error

ValidateEventSource validates gerrit event source

type ProjectHookConfigs

type ProjectHookConfigs struct {
	// URL: Address of the remote server to post events to
	URL string `json:"url,omitempty"`
	// Events:
	// Type of the event which will be posted to the remote url. Multiple event types can be specified, listing event types which should be posted.
	// When no event type is configured, all events will be posted.
	Events []string `json:"events,omitempty"`
	// ConnectionTimeout:
	// Maximum interval of time in milliseconds the plugin waits for a connection to the target instance.
	// When not specified, the default value is derrived from global configuration.
	ConnectionTimeout string `json:"connectionTimeout,omitempty"`
	// SocketTimeout:
	// Maximum interval of time in milliseconds the plugin waits for a response from the target instance once the connection has been established.
	// When not specified, the default value is derrived from global configuration.
	SocketTimeout string `json:"socketTimeout,omitempty"`
	// MaxTries:
	// Maximum number of times the plugin should attempt when posting an event to the target url. Setting this value to 0 will disable retries.
	// When not specified, the default value is derrived from global configuration.
	MaxTries string `json:"maxTries,omitempty"`
	// RetryInterval:
	// The interval of time in milliseconds between the subsequent auto-retries.
	// When not specified, the default value is derrived from global configuration.
	RetryInterval string `json:"retryInterval,omitempty"`
	// SslVerify:
	// When 'true' SSL certificate verification of remote url is performed when payload is delivered, the default value is derived from global configuration.
	SslVerify bool `json:"sslVerify,omitempty"`
}

ProjectHookConfigs is the config for gerrit project Ref: https://gerrit.googlesource.com/plugins/webhooks/+doc/master/src/main/resources/Documentation/config.md

type Router

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

Router contains the configuration information for a route

func (*Router) GetRoute

func (router *Router) GetRoute() *webhook.Route

GetRoute returns the route

func (*Router) HandleRoute

func (router *Router) HandleRoute(writer http.ResponseWriter, request *http.Request)

HandleRoute handles incoming requests on the route

func (*Router) PostActivate

func (router *Router) PostActivate() error

PostActivate performs operations once the route is activated and ready to consume requests

func (*Router) PostInactivate

func (router *Router) PostInactivate() error

PostInactivate performs operations after the route is inactivated

Jump to

Keyboard shortcuts

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