server

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: Apache-2.0 Imports: 23 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCerts added in v0.20.2

func CreateCerts(ctx context.Context, coreV1Interface corev1.CoreV1Interface, logger *zap.SugaredLogger) (string, string, []byte, error)

Types

type Error

type Error interface {
	error
	Status() int
}

Error represents a handler error. It provides methods for a HTTP status code and embeds the built-in error interface.

type HTTPError

type HTTPError struct {
	Code int
	Err  error
}

HTTPError represents an error with an associated HTTP status code.

func (HTTPError) Error

func (se HTTPError) Error() string

Allows HTTPError to satisfy the error interface.

func (HTTPError) Status

func (se HTTPError) Status() int

Returns our HTTP status code.

type Server

type Server struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewWithCoreInterceptors

func NewWithCoreInterceptors(sg interceptors.SecretGetter, l *zap.SugaredLogger) (*Server, error)

func (*Server) ExecuteInterceptor

func (is *Server) ExecuteInterceptor(r *http.Request) ([]byte, error)

func (*Server) RegisterInterceptor added in v0.18.0

func (is *Server) RegisterInterceptor(path string, interceptor triggersv1.InterceptorInterface)

RegisterInterceptor sets up the interceptor to be served at the specfied path

func (*Server) ServeHTTP

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

func (*Server) UpdateCRDWithCaCert added in v0.20.2

func (is *Server) UpdateCRDWithCaCert(ctx context.Context, triggersV1Alpha1 triggersv1alpha1.TriggersV1alpha1Interface,
	ci []*v1alpha1.ClusterInterceptor, caCert []byte) error

UpdateCRDWithCaCert updates clusterinterceptor crd caBundle with caCert

Jump to

Keyboard shortcuts

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