Documentation ¶
Overview ¶
Package http provides an HTTP frontend for the agent baker service. This is a simple HTTP server that routes requests to the appropriate backend agent baker service.
Usage is simple:
verMap, err := versions.New() if err != nil { panic(err) } serv, err := New(verMap) if err != nil { panic(err) } panic(serv.ListenAndServe(*addr))
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server provides an HTTP frontend that routes requests to the appropriate backend agent baker service.
func (*Server) ListenAndServe ¶
ListenAndServe starts the server on the given address. This is a blocking call. It returns an error if the server fails to start. addr should be a string in the format "host:port".
type VersionedReq ¶
type VersionedReq[T any] struct { // ABVersion is the Agent Baker version. This must be set to a valid version // or "latest". ABVersion versions.Version // Req is the request to be sent to the agent baker service. Req T }
VersionedReq is a request that includes an Agent Baker version.
Click to show internal directories.
Click to hide internal directories.