httpserver

package
v2.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartServer

func StartServer(opts *ServerOptions, executorConfigPath string) error

StartServer initializes and starts the Ratify server with provided options and configuration file path.

Types

type ServerOptions

type ServerOptions struct {
	// HTTPServerAddress is the address where the server will listen for
	// incoming requests.
	// It should be in the format "host:port" (e.g., ":8080").
	// Required.
	HTTPServerAddress string

	// CertFile is the path to the TLS certificate file. If not provided, the
	// server will run without TLS.
	// Optional.
	CertFile string

	// KeyFile is the path to the TLS key file. If not provided, the server
	// will run without TLS.
	// Optional.
	KeyFile string

	// GatekeeperCACertFile is the path to the Gatekeeper CA certificate file.
	// Optional.
	GatekeeperCACertFile string

	// VerifyTimeout is the duration to wait for a verification request to
	// complete before timing out. Default is 5 seconds if not specified.
	// Optional.
	VerifyTimeout time.Duration

	// MutateTimeout is the duration to wait for a mutation request to
	// complete before timing out. Default is 2 seconds if not specified.
	// Optional.
	MutateTimeout time.Duration

	// DisableMutation indicates whether to disable the mutation handler.
	// If set to true, the mutation handler will not be registered.
	// Optional.
	DisableMutation bool

	// CertRotatorReady is a channel that signals when the certificate rotator
	// is ready. If not provided, the server will run without rotating the TLS
	// certificates.
	// Optional.
	CertRotatorReady chan struct{}
}

ServerOptions holds the configuration options for the Ratify server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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