apiserver

package
v0.20261125.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// RoutePathDistroSIGImageConfig the route path to get node bootstrapping data.
	RoutePathDistroSIGImageConfig string = "/getdistrosigimageconfig"
)
View Source
const (
	// RoutePathLatestSIGImageConfig the route path to get node bootstrapping data.
	RoutePathLatestSIGImageConfig string = "/getlatestsigimageconfig"
)
View Source
const (
	// RoutePathNodeBootstrapData the route path to get node bootstrapping data.
	RoutePathNodeBootstrapData string = "/getnodebootstrapdata"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

type APIServer struct {
	Options *Options
	// contains filtered or unexported fields
}

APIServer contains the connections details required to run the api.

func NewAPIServer

func NewAPIServer(o *Options) (*APIServer, error)

NewAPIServer creates an APIServer object with defaults.

func (*APIServer) GetDistroSigImageConfig

func (api *APIServer) GetDistroSigImageConfig(w http.ResponseWriter, r *http.Request)

GetDistroSigImageConfig endpoint for sig config for all distros in one shot.

func (*APIServer) GetLatestSigImageConfig

func (api *APIServer) GetLatestSigImageConfig(w http.ResponseWriter, r *http.Request)

GetLatestSigImageConfig endpoint for getting latest sig image reference.

func (*APIServer) GetNodeBootstrapData

func (api *APIServer) GetNodeBootstrapData(w http.ResponseWriter, r *http.Request)

GetNodeBootstrapData endpoint for getting node bootstrapping data.

func (*APIServer) ListenAndServe

func (api *APIServer) ListenAndServe(ctx context.Context) error

ListenAndServe wraps http.Server and provides context-based cancelation.

func (*APIServer) NewRouter

func (api *APIServer) NewRouter() *mux.Router

NewRouter returns a new router with defaults.

type OptionConfigurator

type OptionConfigurator func(opts *Options)

OptionConfigurator is a function which can configure an Options object.

type Options

type Options struct {
	Addr    string
	Toggles toggles.Toggles
}

Options holds the options for the api server.

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

Route defines the route specifics.

type Routes

type Routes []Route

Routes list of routes to be added to the server.

Jump to

Keyboard shortcuts

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