apiserver

package
v0.20240221.1-devinwon Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 11 Imported by: 0

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
}

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)

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 Options

type Options struct {
	Addr string
}

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