modules

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InvalidPlaneTypeErrorResponse

func InvalidPlaneTypeErrorResponse(planeType string, supportedPlaneTypes []string) rest.Response

InvalidPlaneTypeErrorResponse returns a 400 response with error code CodeInvalidPlaneType.

Types

type Initializer

type Initializer interface {
	// Initialize initializes and returns the http.Handler that will be registered with the router to handle requests for the plane.
	Initialize(ctx context.Context) (http.Handler, error)

	// PlaneType returns the type of plane that the module is providing functionality for. This should match
	// the plane type in the URL path for the plane.
	//
	// Examples:
	//
	// - aws
	// - azure
	// - kubernetes
	// - radius
	PlaneType() string
}

Initializer is an interface that can be implemented by modules that want to provide functionality for a plane.

type Options

type Options struct {
	// Config is the bootstrap configuration loaded from config file.
	Config *hostoptions.UCPConfig

	// Address is the hostname + port of the server hosting UCP.
	Address string

	// PathBase is the base path of the server as it appears in the URL. eg: '/apis/api.ucp.dev/v1alpha3'.
	PathBase string

	// Location is the location of the server hosting UCP.
	Location string

	// DataProvider is the data storage provider.
	DataProvider dataprovider.DataStorageProvider

	// QeueueProvider provides access to the queue for async operations.
	QueueProvider *queueprovider.QueueProvider

	// SecretProvider is the secret store provider used for managing credentials.
	SecretProvider *secretprovider.SecretProvider

	// SpecLoader is the OpenAPI spec loader containing specs for the UCP APIs.
	SpecLoader *validator.Loader

	// StatusManager is the async operation status manager.
	StatusManager statusmanager.StatusManager

	// UCPConnection is the connection used to communicate with UCP APIs.
	UCPConnection sdk.Connection
}

Options defines the options for a module.

Jump to

Keyboard shortcuts

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