apiserver

package
v0.20240430.0-lilypan Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RoutePathDistroSIGImageConfig the route path to get node bootstrapping data.
	RoutePathDistroSIGImageConfig string = "/getdistrosigimageconfig"
)
View Source
const (
	// RoutePathGetCachedVersionsOnVHD the route path to get cached vhd images.
	RoutePathGetCachedVersionsOnVHD string = "/getcachedversionsonvhd"
)
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
}

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) GetCachedVersionsOnVHD

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

GetCachedVersionsOnVHD endpoint for getting the current versions of components cached on the vhd.

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)

GetNodeBootstrapConfig 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 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