Documentation
¶
Overview ¶
Package gen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Package gen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Index ¶
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
- func NewCancelModelDownloadRequest(server string, id ModelID) (*http.Request, error)
- func NewCheckUpdateRequest(server string) (*http.Request, error)
- func NewDeleteModelRequest(server string, id ModelID) (*http.Request, error)
- func NewEnrollNodeRequest(server string, body EnrollNodeJSONRequestBody) (*http.Request, error)
- func NewEnrollNodeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewGetActivityRequest(server string) (*http.Request, error)
- func NewGetCatalogRequest(server string, params *GetCatalogParams) (*http.Request, error)
- func NewGetEarningsRequest(server string) (*http.Request, error)
- func NewGetHealthRequest(server string) (*http.Request, error)
- func NewGetLimitsRequest(server string) (*http.Request, error)
- func NewGetLogsRequest(server string, params *GetLogsParams) (*http.Request, error)
- func NewGetStatusRequest(server string) (*http.Request, error)
- func NewListModelsRequest(server string) (*http.Request, error)
- func NewLoadModelRequest(server string, id ModelID) (*http.Request, error)
- func NewPinModelRequest(server string, id ModelID, body PinModelJSONRequestBody) (*http.Request, error)
- func NewPinModelRequestWithBody(server string, id ModelID, contentType string, body io.Reader) (*http.Request, error)
- func NewSetDefaultModelRequest(server string, id ModelID) (*http.Request, error)
- func NewStartModelDownloadRequest(server string, id ModelID) (*http.Request, error)
- func NewUnloadModelRequest(server string, id ModelID) (*http.Request, error)
- func NewUpdateLimitsRequest(server string, body UpdateLimitsJSONRequestBody) (*http.Request, error)
- func NewUpdateLimitsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- type ActivityEvent
- type ActivityList
- type Assignment
- type BadRequest
- type CancelModelDownloadResponse
- func (r CancelModelDownloadResponse) ContentType() string
- func (r CancelModelDownloadResponse) GetBody() []byte
- func (r CancelModelDownloadResponse) GetJSON200() *Ok
- func (r CancelModelDownloadResponse) GetJSON401() *Unauthorized
- func (r CancelModelDownloadResponse) GetJSON404() *NotFound
- func (r CancelModelDownloadResponse) GetJSON501() *Unsupported
- func (r CancelModelDownloadResponse) Status() string
- func (r CancelModelDownloadResponse) StatusCode() int
- type CatalogEntry
- type CatalogList
- type CheckUpdateResponse
- func (r CheckUpdateResponse) ContentType() string
- func (r CheckUpdateResponse) GetBody() []byte
- func (r CheckUpdateResponse) GetJSON200() *Update
- func (r CheckUpdateResponse) GetJSON401() *Unauthorized
- func (r CheckUpdateResponse) GetJSON502() *Upstream
- func (r CheckUpdateResponse) Status() string
- func (r CheckUpdateResponse) StatusCode() int
- type Client
- func (c *Client) CancelModelDownload(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) CheckUpdate(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteModel(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) EnrollNode(ctx context.Context, body EnrollNodeJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) EnrollNodeWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) GetActivity(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetCatalog(ctx context.Context, params *GetCatalogParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetEarnings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetLimits(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetLogs(ctx context.Context, params *GetLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListModels(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) LoadModel(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PinModel(ctx context.Context, id ModelID, body PinModelJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PinModelWithBody(ctx context.Context, id ModelID, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) SetDefaultModel(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) StartModelDownload(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UnloadModel(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdateLimits(ctx context.Context, body UpdateLimitsJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateLimitsWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CancelModelDownloadWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*CancelModelDownloadResponse, error)
- func (c *ClientWithResponses) CheckUpdateWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CheckUpdateResponse, error)
- func (c *ClientWithResponses) DeleteModelWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*DeleteModelResponse, error)
- func (c *ClientWithResponses) EnrollNodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*EnrollNodeResponse, error)
- func (c *ClientWithResponses) EnrollNodeWithResponse(ctx context.Context, body EnrollNodeJSONRequestBody, ...) (*EnrollNodeResponse, error)
- func (c *ClientWithResponses) GetActivityWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetActivityResponse, error)
- func (c *ClientWithResponses) GetCatalogWithResponse(ctx context.Context, params *GetCatalogParams, reqEditors ...RequestEditorFn) (*GetCatalogResponse, error)
- func (c *ClientWithResponses) GetEarningsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEarningsResponse, error)
- func (c *ClientWithResponses) GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)
- func (c *ClientWithResponses) GetLimitsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetLimitsResponse, error)
- func (c *ClientWithResponses) GetLogsWithResponse(ctx context.Context, params *GetLogsParams, reqEditors ...RequestEditorFn) (*GetLogsResponse, error)
- func (c *ClientWithResponses) GetStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)
- func (c *ClientWithResponses) ListModelsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListModelsResponse, error)
- func (c *ClientWithResponses) LoadModelWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*LoadModelResponse, error)
- func (c *ClientWithResponses) PinModelWithBodyWithResponse(ctx context.Context, id ModelID, contentType string, body io.Reader, ...) (*PinModelResponse, error)
- func (c *ClientWithResponses) PinModelWithResponse(ctx context.Context, id ModelID, body PinModelJSONRequestBody, ...) (*PinModelResponse, error)
- func (c *ClientWithResponses) SetDefaultModelWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*SetDefaultModelResponse, error)
- func (c *ClientWithResponses) StartModelDownloadWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*StartModelDownloadResponse, error)
- func (c *ClientWithResponses) UnloadModelWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*UnloadModelResponse, error)
- func (c *ClientWithResponses) UpdateLimitsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*UpdateLimitsResponse, error)
- func (c *ClientWithResponses) UpdateLimitsWithResponse(ctx context.Context, body UpdateLimitsJSONRequestBody, ...) (*UpdateLimitsResponse, error)
- type ClientWithResponsesInterface
- type DeleteModelResponse
- func (r DeleteModelResponse) ContentType() string
- func (r DeleteModelResponse) GetBody() []byte
- func (r DeleteModelResponse) GetJSON200() *Ok
- func (r DeleteModelResponse) GetJSON401() *Unauthorized
- func (r DeleteModelResponse) GetJSON404() *NotFound
- func (r DeleteModelResponse) GetJSON501() *Unsupported
- func (r DeleteModelResponse) Status() string
- func (r DeleteModelResponse) StatusCode() int
- type Disk
- type DownloadStatus
- type Earnings
- type EarningsSource
- type EnrollNodeJSONRequestBody
- type EnrollNodeResponse
- func (r EnrollNodeResponse) ContentType() string
- func (r EnrollNodeResponse) GetBody() []byte
- func (r EnrollNodeResponse) GetJSON200() *EnrollResponse
- func (r EnrollNodeResponse) GetJSON400() *BadRequest
- func (r EnrollNodeResponse) GetJSON401() *Unauthorized
- func (r EnrollNodeResponse) GetJSON409() *Error
- func (r EnrollNodeResponse) GetJSON501() *Unsupported
- func (r EnrollNodeResponse) GetJSON502() *Upstream
- func (r EnrollNodeResponse) Status() string
- func (r EnrollNodeResponse) StatusCode() int
- type EnrollRequest
- type EnrollResponse
- type Error
- type GetActivityResponse
- type GetCatalogParams
- type GetCatalogResponse
- func (r GetCatalogResponse) ContentType() string
- func (r GetCatalogResponse) GetBody() []byte
- func (r GetCatalogResponse) GetJSON200() *CatalogList
- func (r GetCatalogResponse) GetJSON401() *Unauthorized
- func (r GetCatalogResponse) GetJSON501() *Unsupported
- func (r GetCatalogResponse) GetJSON502() *Upstream
- func (r GetCatalogResponse) Status() string
- func (r GetCatalogResponse) StatusCode() int
- type GetEarningsResponse
- type GetHealthResponse
- type GetLimitsResponse
- func (r GetLimitsResponse) ContentType() string
- func (r GetLimitsResponse) GetBody() []byte
- func (r GetLimitsResponse) GetJSON200() *Limits
- func (r GetLimitsResponse) GetJSON401() *Unauthorized
- func (r GetLimitsResponse) GetJSON501() *Unsupported
- func (r GetLimitsResponse) Status() string
- func (r GetLimitsResponse) StatusCode() int
- type GetLogsParams
- type GetLogsResponse
- type GetStatusResponse
- type Gpu
- type Hardware
- type Health
- type HttpRequestDoer
- type InvalidParamFormatError
- type Limits
- type ListModelsResponse
- type LoadModelResponse
- func (r LoadModelResponse) ContentType() string
- func (r LoadModelResponse) GetBody() []byte
- func (r LoadModelResponse) GetJSON200() *Ok
- func (r LoadModelResponse) GetJSON401() *Unauthorized
- func (r LoadModelResponse) GetJSON404() *NotFound
- func (r LoadModelResponse) GetJSON501() *Unsupported
- func (r LoadModelResponse) GetJSON502() *Upstream
- func (r LoadModelResponse) Status() string
- func (r LoadModelResponse) StatusCode() int
- type LogEntry
- type LogList
- type Memory
- type MiddlewareFunc
- type ModelID
- type ModelList
- type ModelRow
- type NotFound
- type Ok
- type PinModelJSONRequestBody
- type PinModelResponse
- func (r PinModelResponse) ContentType() string
- func (r PinModelResponse) GetBody() []byte
- func (r PinModelResponse) GetJSON200() *Ok
- func (r PinModelResponse) GetJSON401() *Unauthorized
- func (r PinModelResponse) GetJSON404() *NotFound
- func (r PinModelResponse) GetJSON501() *Unsupported
- func (r PinModelResponse) Status() string
- func (r PinModelResponse) StatusCode() int
- type PinRequest
- type RequestEditorFn
- type RequiredHeaderError
- type RequiredParamError
- type ServeMux
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CancelModelDownload(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CheckUpdate(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteModel(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) EnrollNode(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetActivity(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCatalog(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetEarnings(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetLimits(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetLogs(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetStatus(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListModels(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) LoadModel(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PinModel(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) SetDefaultModel(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) StartModelDownload(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UnloadModel(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateLimits(w http.ResponseWriter, r *http.Request)
- type SetDefaultModelResponse
- func (r SetDefaultModelResponse) ContentType() string
- func (r SetDefaultModelResponse) GetBody() []byte
- func (r SetDefaultModelResponse) GetJSON200() *Ok
- func (r SetDefaultModelResponse) GetJSON401() *Unauthorized
- func (r SetDefaultModelResponse) GetJSON404() *NotFound
- func (r SetDefaultModelResponse) GetJSON501() *Unsupported
- func (r SetDefaultModelResponse) Status() string
- func (r SetDefaultModelResponse) StatusCode() int
- type StartModelDownloadResponse
- func (r StartModelDownloadResponse) ContentType() string
- func (r StartModelDownloadResponse) GetBody() []byte
- func (r StartModelDownloadResponse) GetJSON200() *DownloadStatus
- func (r StartModelDownloadResponse) GetJSON202() *DownloadStatus
- func (r StartModelDownloadResponse) GetJSON401() *Unauthorized
- func (r StartModelDownloadResponse) GetJSON404() *NotFound
- func (r StartModelDownloadResponse) GetJSON501() *Unsupported
- func (r StartModelDownloadResponse) GetJSON502() *Upstream
- func (r StartModelDownloadResponse) Status() string
- func (r StartModelDownloadResponse) StatusCode() int
- type Stats
- type Status
- type StdHTTPServerOptions
- type TooManyValuesForParamError
- type Unauthorized
- type UnescapedCookieParamError
- type UnloadModelResponse
- func (r UnloadModelResponse) ContentType() string
- func (r UnloadModelResponse) GetBody() []byte
- func (r UnloadModelResponse) GetJSON200() *Ok
- func (r UnloadModelResponse) GetJSON401() *Unauthorized
- func (r UnloadModelResponse) GetJSON404() *NotFound
- func (r UnloadModelResponse) GetJSON501() *Unsupported
- func (r UnloadModelResponse) Status() string
- func (r UnloadModelResponse) StatusCode() int
- type UnmarshalingParamError
- type Unsupported
- type Update
- type UpdateLimitsJSONRequestBody
- type UpdateLimitsResponse
- func (r UpdateLimitsResponse) ContentType() string
- func (r UpdateLimitsResponse) GetBody() []byte
- func (r UpdateLimitsResponse) GetJSON200() *Limits
- func (r UpdateLimitsResponse) GetJSON400() *BadRequest
- func (r UpdateLimitsResponse) GetJSON401() *Unauthorized
- func (r UpdateLimitsResponse) GetJSON501() *Unsupported
- func (r UpdateLimitsResponse) Status() string
- func (r UpdateLimitsResponse) StatusCode() int
- type Upstream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func NewCancelModelDownloadRequest ¶ added in v0.6.0
NewCancelModelDownloadRequest constructs an http.Request for the CancelModelDownload method
func NewCheckUpdateRequest ¶ added in v0.6.0
NewCheckUpdateRequest constructs an http.Request for the CheckUpdate method
func NewDeleteModelRequest ¶ added in v0.6.0
NewDeleteModelRequest constructs an http.Request for the DeleteModel method
func NewEnrollNodeRequest ¶ added in v0.6.0
func NewEnrollNodeRequest(server string, body EnrollNodeJSONRequestBody) (*http.Request, error)
NewEnrollNodeRequest calls the generic EnrollNode builder with application/json body
func NewEnrollNodeRequestWithBody ¶ added in v0.6.0
func NewEnrollNodeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewEnrollNodeRequestWithBody constructs an http.Request for the EnrollNode method, with any body, and a specified content type
func NewGetActivityRequest ¶ added in v0.6.0
NewGetActivityRequest constructs an http.Request for the GetActivity method
func NewGetCatalogRequest ¶ added in v0.6.0
func NewGetCatalogRequest(server string, params *GetCatalogParams) (*http.Request, error)
NewGetCatalogRequest constructs an http.Request for the GetCatalog method
func NewGetEarningsRequest ¶ added in v0.6.0
NewGetEarningsRequest constructs an http.Request for the GetEarnings method
func NewGetHealthRequest ¶ added in v0.6.0
NewGetHealthRequest constructs an http.Request for the GetHealth method
func NewGetLimitsRequest ¶ added in v0.6.0
NewGetLimitsRequest constructs an http.Request for the GetLimits method
func NewGetLogsRequest ¶ added in v0.6.0
func NewGetLogsRequest(server string, params *GetLogsParams) (*http.Request, error)
NewGetLogsRequest constructs an http.Request for the GetLogs method
func NewGetStatusRequest ¶ added in v0.6.0
NewGetStatusRequest constructs an http.Request for the GetStatus method
func NewListModelsRequest ¶ added in v0.6.0
NewListModelsRequest constructs an http.Request for the ListModels method
func NewLoadModelRequest ¶ added in v0.6.0
NewLoadModelRequest constructs an http.Request for the LoadModel method
func NewPinModelRequest ¶ added in v0.6.0
func NewPinModelRequest(server string, id ModelID, body PinModelJSONRequestBody) (*http.Request, error)
NewPinModelRequest calls the generic PinModel builder with application/json body
func NewPinModelRequestWithBody ¶ added in v0.6.0
func NewPinModelRequestWithBody(server string, id ModelID, contentType string, body io.Reader) (*http.Request, error)
NewPinModelRequestWithBody constructs an http.Request for the PinModel method, with any body, and a specified content type
func NewSetDefaultModelRequest ¶ added in v0.6.0
NewSetDefaultModelRequest constructs an http.Request for the SetDefaultModel method
func NewStartModelDownloadRequest ¶ added in v0.6.0
NewStartModelDownloadRequest constructs an http.Request for the StartModelDownload method
func NewUnloadModelRequest ¶ added in v0.6.0
NewUnloadModelRequest constructs an http.Request for the UnloadModel method
func NewUpdateLimitsRequest ¶ added in v0.6.0
func NewUpdateLimitsRequest(server string, body UpdateLimitsJSONRequestBody) (*http.Request, error)
NewUpdateLimitsRequest calls the generic UpdateLimits builder with application/json body
Types ¶
type ActivityEvent ¶ added in v0.4.0
type ActivityEvent struct {
// Actor mesh | operator | daemon
Actor string `json:"actor"`
// Detail Reason / error text when there is one.
Detail *string `json:"detail,omitempty"`
// Kind download_started | downloaded | download_failed | loaded | unloaded | evicted | declined | missing | update_available | assignment
Kind string `json:"kind"`
// Message Human-readable one-liner for activity feeds.
Message string `json:"message"`
Model *string `json:"model,omitempty"`
Time time.Time `json:"time"`
}
ActivityEvent defines model for ActivityEvent.
type ActivityList ¶ added in v0.4.0
type ActivityList struct {
Events []ActivityEvent `json:"events"`
}
ActivityList defines model for ActivityList.
type Assignment ¶
type Assignment struct {
// Error Why it was declined or failed.
Error *string `json:"error,omitempty"`
Since time.Time `json:"since"`
// State assigned | downloading | ready | cached | declined | failed | evicted. `cached` is a mesh-placed model that is on disk but unloaded (idle unload or memory pressure); the coordinator re-sends the assignment to load it when demand returns.
State string `json:"state"`
}
Assignment Coordinator placement status for this model, when the mesh asked for it. Failures and refusals stay visible for ten minutes.
type CancelModelDownloadResponse ¶ added in v0.6.0
type CancelModelDownloadResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Ok
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON501 the response for an HTTP 501 `application/json` response
JSON501 *Unsupported
}
func ParseCancelModelDownloadResponse ¶ added in v0.6.0
func ParseCancelModelDownloadResponse(rsp *http.Response) (*CancelModelDownloadResponse, error)
ParseCancelModelDownloadResponse parses an HTTP response from a CancelModelDownloadWithResponse call
func (CancelModelDownloadResponse) ContentType ¶ added in v0.6.0
func (r CancelModelDownloadResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CancelModelDownloadResponse) GetBody ¶ added in v0.6.0
func (r CancelModelDownloadResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CancelModelDownloadResponse) GetJSON200 ¶ added in v0.6.0
func (r CancelModelDownloadResponse) GetJSON200() *Ok
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (CancelModelDownloadResponse) GetJSON401 ¶ added in v0.6.0
func (r CancelModelDownloadResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (CancelModelDownloadResponse) GetJSON404 ¶ added in v0.6.0
func (r CancelModelDownloadResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (CancelModelDownloadResponse) GetJSON501 ¶ added in v0.6.0
func (r CancelModelDownloadResponse) GetJSON501() *Unsupported
GetJSON501 returns the response for an HTTP 501 `application/json` response
func (CancelModelDownloadResponse) Status ¶ added in v0.6.0
func (r CancelModelDownloadResponse) Status() string
Status returns HTTPResponse.Status
func (CancelModelDownloadResponse) StatusCode ¶ added in v0.6.0
func (r CancelModelDownloadResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CatalogEntry ¶
type CatalogEntry struct {
ArtifactUrl string `json:"artifact_url"`
ContextLength int64 `json:"context_length"`
Default bool `json:"default"`
// DisplayName Human-readable name incl. quant ("Qwen3.8 27B · Q4_K_M") — show this, not the id: ids are ambiguous now that model lines carry point versions (qwen3-8b vs qwen3.8-27b). Optional: absent when the daemon's catalog predates the field.
DisplayName *string `json:"display_name,omitempty"`
Embeddings bool `json:"embeddings"`
Family string `json:"family"`
Id string `json:"id"`
Installed bool `json:"installed"`
License string `json:"license"`
Loaded bool `json:"loaded"`
MinRamMb int64 `json:"min_ram_mb"`
MinVramMb int64 `json:"min_vram_mb"`
ParamsB float64 `json:"params_b"`
// PartsDone Files downloaded and verified so far; present while downloading a multi-file model.
PartsDone *int `json:"parts_done,omitempty"`
// PartsTotal Files in the artifact (GGUF shards plus mmproj); present only for multi-file models. `size_bytes` is already their sum.
PartsTotal *int `json:"parts_total,omitempty"`
PayoutClass string `json:"payout_class"`
Quant string `json:"quant"`
// ReceivedBytes Live progress summed over every file; present only while downloading.
ReceivedBytes *int64 `json:"received_bytes,omitempty"`
Sha256 string `json:"sha256"`
SizeBytes int64 `json:"size_bytes"`
// State downloading | ready; present when the artifact is local.
State *string `json:"state,omitempty"`
// TotalBytes What the download fetches in all — `size_bytes` plus the mmproj sidecar when there is one — the denominator for `received_bytes`. Present only while downloading.
TotalBytes *int64 `json:"total_bytes,omitempty"`
}
CatalogEntry A catalog model merged with this node's local state.
type CatalogList ¶
type CatalogList struct {
Models []CatalogEntry `json:"models"`
}
CatalogList defines model for CatalogList.
type CheckUpdateResponse ¶ added in v0.6.0
type CheckUpdateResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Update
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON502 the response for an HTTP 502 `application/json` response
JSON502 *Upstream
}
func ParseCheckUpdateResponse ¶ added in v0.6.0
func ParseCheckUpdateResponse(rsp *http.Response) (*CheckUpdateResponse, error)
ParseCheckUpdateResponse parses an HTTP response from a CheckUpdateWithResponse call
func (CheckUpdateResponse) ContentType ¶ added in v0.6.0
func (r CheckUpdateResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CheckUpdateResponse) GetBody ¶ added in v0.6.0
func (r CheckUpdateResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CheckUpdateResponse) GetJSON200 ¶ added in v0.6.0
func (r CheckUpdateResponse) GetJSON200() *Update
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (CheckUpdateResponse) GetJSON401 ¶ added in v0.6.0
func (r CheckUpdateResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (CheckUpdateResponse) GetJSON502 ¶ added in v0.6.0
func (r CheckUpdateResponse) GetJSON502() *Upstream
GetJSON502 returns the response for an HTTP 502 `application/json` response
func (CheckUpdateResponse) Status ¶ added in v0.6.0
func (r CheckUpdateResponse) Status() string
Status returns HTTPResponse.Status
func (CheckUpdateResponse) StatusCode ¶ added in v0.6.0
func (r CheckUpdateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Client ¶ added in v0.6.0
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶ added in v0.6.0
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CancelModelDownload ¶ added in v0.6.0
func (c *Client) CancelModelDownload(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
CancelModelDownload Cancel an in-flight download (the .partial file is kept for resume)
Corresponds with DELETE /api/v1/models/{id}/download (the `CancelModelDownload` operationId).
func (*Client) CheckUpdate ¶ added in v0.6.0
func (c *Client) CheckUpdate(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
CheckUpdate Run a version check now
Fetches the version feed immediately (the daemon otherwise checks on startup and hourly) and returns the result.
Corresponds with POST /api/v1/update/check (the `CheckUpdate` operationId).
func (*Client) DeleteModel ¶ added in v0.6.0
func (c *Client) DeleteModel(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
DeleteModel Delete a model from disk (and unload it if loaded)
Corresponds with DELETE /api/v1/models/{id} (the `DeleteModel` operationId).
func (*Client) EnrollNode ¶ added in v0.6.0
func (c *Client) EnrollNode(ctx context.Context, body EnrollNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
EnrollNode Enroll (or re-enroll) this node with the coordinator
Submits a claim code to the running daemon: enrollment plus a live tunnel (re)start, no restart required. Re-enrollment — needed when the mesh CA rotates — is only possible through this route; the startup path ignores claim codes while credentials exist.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/enroll (the `EnrollNode` operationId).
func (*Client) EnrollNodeWithBody ¶ added in v0.6.0
func (c *Client) EnrollNodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
EnrollNodeWithBody Enroll (or re-enroll) this node with the coordinator
Submits a claim code to the running daemon: enrollment plus a live tunnel (re)start, no restart required. Re-enrollment — needed when the mesh CA rotates — is only possible through this route; the startup path ignores claim codes while credentials exist.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/enroll (the `EnrollNode` operationId).
func (*Client) GetActivity ¶ added in v0.6.0
func (c *Client) GetActivity(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetActivity Recent node activity (downloads, loads, evictions, declines)
The last 200 things the daemon did to its model store and runtimes, newest first, including everything the mesh did on the operator's behalf. In memory only; cleared on restart.
Corresponds with GET /api/v1/activity (the `GetActivity` operationId).
func (*Client) GetCatalog ¶ added in v0.6.0
func (c *Client) GetCatalog(ctx context.Context, params *GetCatalogParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetCatalog Model catalog merged with local state
Corresponds with GET /api/v1/catalog (the `GetCatalog` operationId).
func (*Client) GetEarnings ¶ added in v0.6.0
func (c *Client) GetEarnings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetEarnings Earnings (ledger-backed when enrolled, else a labelled estimate)
Corresponds with GET /api/v1/earnings (the `GetEarnings` operationId).
func (*Client) GetHealth ¶ added in v0.6.0
func (c *Client) GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetHealth Liveness probe
The one unauthenticated management route: `tera up`, service managers, and the desktop app probe it before they hold a token.
Corresponds with GET /api/v1/health (the `GetHealth` operationId).
func (*Client) GetLimits ¶ added in v0.6.0
func (c *Client) GetLimits(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetLimits Live governor limits
Corresponds with GET /api/v1/limits (the `GetLimits` operationId).
func (*Client) GetLogs ¶ added in v0.6.0
func (c *Client) GetLogs(ctx context.Context, params *GetLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetLogs Recent daemon log entries (ring buffer)
Corresponds with GET /api/v1/logs (the `GetLogs` operationId).
func (*Client) GetStatus ¶ added in v0.6.0
func (c *Client) GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetStatus Node status snapshot
Corresponds with GET /api/v1/status (the `GetStatus` operationId).
func (*Client) ListModels ¶ added in v0.6.0
func (c *Client) ListModels(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
ListModels Locally installed models
Corresponds with GET /api/v1/models (the `ListModels` operationId).
func (*Client) LoadModel ¶ added in v0.6.0
func (c *Client) LoadModel(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
LoadModel Load a model into the serving runtime
Synchronous — llama-server startup takes seconds and the caller wants the verdict. Downloads first if the artifact isn't cached.
Corresponds with POST /api/v1/models/{id}/load (the `LoadModel` operationId).
func (*Client) PinModel ¶ added in v0.6.0
func (c *Client) PinModel(ctx context.Context, id ModelID, body PinModelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PinModel Pin or unpin a model (pinned models are never LRU-evicted)
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/models/{id}/pin (the `PinModel` operationId).
func (*Client) PinModelWithBody ¶ added in v0.6.0
func (c *Client) PinModelWithBody(ctx context.Context, id ModelID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PinModelWithBody Pin or unpin a model (pinned models are never LRU-evicted)
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/models/{id}/pin (the `PinModel` operationId).
func (*Client) SetDefaultModel ¶ added in v0.6.0
func (c *Client) SetDefaultModel(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
SetDefaultModel Serve this model when a request names none (must be loaded)
Corresponds with POST /api/v1/models/{id}/default (the `SetDefaultModel` operationId).
func (*Client) StartModelDownload ¶ added in v0.6.0
func (c *Client) StartModelDownload(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
StartModelDownload Start downloading a catalog model in the background
202 when a download starts (or is already in flight); 200 when the model is already cached and ready. Progress streams over `/api/v1/events` as `model_progress` and shows in `received_bytes` on the model list.
Corresponds with POST /api/v1/models/{id}/download (the `StartModelDownload` operationId).
func (*Client) UnloadModel ¶ added in v0.6.0
func (c *Client) UnloadModel(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
UnloadModel Unload a model from the runtime (the artifact stays cached)
Corresponds with POST /api/v1/models/{id}/unload (the `UnloadModel` operationId).
func (*Client) UpdateLimits ¶ added in v0.6.0
func (c *Client) UpdateLimits(ctx context.Context, body UpdateLimitsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateLimits Update governor limits
Applies live and persists to the daemon-owned `<data_dir>/limits.toml` overlay; the operator's config.toml is never rewritten.
Takes a body of the `application/json` content type.
Corresponds with PUT /api/v1/limits (the `UpdateLimits` operationId).
func (*Client) UpdateLimitsWithBody ¶ added in v0.6.0
func (c *Client) UpdateLimitsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateLimitsWithBody Update governor limits
Applies live and persists to the daemon-owned `<data_dir>/limits.toml` overlay; the operator's config.toml is never rewritten.
Takes any type of body and a specified content type.
Corresponds with PUT /api/v1/limits (the `UpdateLimits` operationId).
type ClientInterface ¶ added in v0.6.0
type ClientInterface interface {
// GetActivity Recent node activity (downloads, loads, evictions, declines)
//
// The last 200 things the daemon did to its model store and runtimes, newest first, including everything the mesh did on the operator's behalf. In memory only; cleared on restart.
//
// Corresponds with GET /api/v1/activity (the `GetActivity` operationId).
GetActivity(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetCatalog Model catalog merged with local state
//
// Corresponds with GET /api/v1/catalog (the `GetCatalog` operationId).
GetCatalog(ctx context.Context, params *GetCatalogParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetEarnings Earnings (ledger-backed when enrolled, else a labelled estimate)
//
// Corresponds with GET /api/v1/earnings (the `GetEarnings` operationId).
GetEarnings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// EnrollNodeWithBody Enroll (or re-enroll) this node with the coordinator
//
// Submits a claim code to the running daemon: enrollment plus a live tunnel (re)start, no restart required. Re-enrollment — needed when the mesh CA rotates — is only possible through this route; the startup path ignores claim codes while credentials exist.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/enroll (the `EnrollNode` operationId).
EnrollNodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// EnrollNode Enroll (or re-enroll) this node with the coordinator
//
// Submits a claim code to the running daemon: enrollment plus a live tunnel (re)start, no restart required. Re-enrollment — needed when the mesh CA rotates — is only possible through this route; the startup path ignores claim codes while credentials exist.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/enroll (the `EnrollNode` operationId).
EnrollNode(ctx context.Context, body EnrollNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetHealth Liveness probe
//
// The one unauthenticated management route: `tera up`, service managers, and the desktop app probe it before they hold a token.
//
// Corresponds with GET /api/v1/health (the `GetHealth` operationId).
GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetLimits Live governor limits
//
// Corresponds with GET /api/v1/limits (the `GetLimits` operationId).
GetLimits(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateLimitsWithBody Update governor limits
//
// Applies live and persists to the daemon-owned `<data_dir>/limits.toml` overlay; the operator's config.toml is never rewritten.
//
// Takes any type of body and a specified content type.
//
// Corresponds with PUT /api/v1/limits (the `UpdateLimits` operationId).
UpdateLimitsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateLimits Update governor limits
//
// Applies live and persists to the daemon-owned `<data_dir>/limits.toml` overlay; the operator's config.toml is never rewritten.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PUT /api/v1/limits (the `UpdateLimits` operationId).
UpdateLimits(ctx context.Context, body UpdateLimitsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetLogs Recent daemon log entries (ring buffer)
//
// Corresponds with GET /api/v1/logs (the `GetLogs` operationId).
GetLogs(ctx context.Context, params *GetLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListModels Locally installed models
//
// Corresponds with GET /api/v1/models (the `ListModels` operationId).
ListModels(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteModel Delete a model from disk (and unload it if loaded)
//
// Corresponds with DELETE /api/v1/models/{id} (the `DeleteModel` operationId).
DeleteModel(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
// SetDefaultModel Serve this model when a request names none (must be loaded)
//
// Corresponds with POST /api/v1/models/{id}/default (the `SetDefaultModel` operationId).
SetDefaultModel(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
// CancelModelDownload Cancel an in-flight download (the .partial file is kept for resume)
//
// Corresponds with DELETE /api/v1/models/{id}/download (the `CancelModelDownload` operationId).
CancelModelDownload(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
// StartModelDownload Start downloading a catalog model in the background
//
// 202 when a download starts (or is already in flight); 200 when the model is already cached and ready. Progress streams over `/api/v1/events` as `model_progress` and shows in `received_bytes` on the model list.
//
// Corresponds with POST /api/v1/models/{id}/download (the `StartModelDownload` operationId).
StartModelDownload(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
// LoadModel Load a model into the serving runtime
//
// Synchronous — llama-server startup takes seconds and the caller wants the verdict. Downloads first if the artifact isn't cached.
//
// Corresponds with POST /api/v1/models/{id}/load (the `LoadModel` operationId).
LoadModel(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
// PinModelWithBody Pin or unpin a model (pinned models are never LRU-evicted)
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/models/{id}/pin (the `PinModel` operationId).
PinModelWithBody(ctx context.Context, id ModelID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// PinModel Pin or unpin a model (pinned models are never LRU-evicted)
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/models/{id}/pin (the `PinModel` operationId).
PinModel(ctx context.Context, id ModelID, body PinModelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// UnloadModel Unload a model from the runtime (the artifact stays cached)
//
// Corresponds with POST /api/v1/models/{id}/unload (the `UnloadModel` operationId).
UnloadModel(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetStatus Node status snapshot
//
// Corresponds with GET /api/v1/status (the `GetStatus` operationId).
GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CheckUpdate Run a version check now
//
// Fetches the version feed immediately (the daemon otherwise checks on startup and hourly) and returns the result.
//
// Corresponds with POST /api/v1/update/check (the `CheckUpdate` operationId).
CheckUpdate(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶ added in v0.6.0
ClientOption allows setting custom parameters during construction
func WithBaseURL ¶ added in v0.6.0
func WithBaseURL(baseURL string) ClientOption
WithBaseURL overrides the baseURL.
func WithHTTPClient ¶ added in v0.6.0
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶ added in v0.6.0
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶ added in v0.6.0
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶ added in v0.6.0
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CancelModelDownloadWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) CancelModelDownloadWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*CancelModelDownloadResponse, error)
CancelModelDownloadWithResponse Cancel an in-flight download (the .partial file is kept for resume)
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /api/v1/models/{id}/download (the `CancelModelDownload` operationId).
func (*ClientWithResponses) CheckUpdateWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) CheckUpdateWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CheckUpdateResponse, error)
CheckUpdateWithResponse Run a version check now
Fetches the version feed immediately (the daemon otherwise checks on startup and hourly) and returns the result.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/update/check (the `CheckUpdate` operationId).
func (*ClientWithResponses) DeleteModelWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) DeleteModelWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*DeleteModelResponse, error)
DeleteModelWithResponse Delete a model from disk (and unload it if loaded)
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /api/v1/models/{id} (the `DeleteModel` operationId).
func (*ClientWithResponses) EnrollNodeWithBodyWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) EnrollNodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EnrollNodeResponse, error)
EnrollNodeWithBodyWithResponse Enroll (or re-enroll) this node with the coordinator
Submits a claim code to the running daemon: enrollment plus a live tunnel (re)start, no restart required. Re-enrollment — needed when the mesh CA rotates — is only possible through this route; the startup path ignores claim codes while credentials exist.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/enroll (the `EnrollNode` operationId).
func (*ClientWithResponses) EnrollNodeWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) EnrollNodeWithResponse(ctx context.Context, body EnrollNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*EnrollNodeResponse, error)
EnrollNodeWithResponse Enroll (or re-enroll) this node with the coordinator
Submits a claim code to the running daemon: enrollment plus a live tunnel (re)start, no restart required. Re-enrollment — needed when the mesh CA rotates — is only possible through this route; the startup path ignores claim codes while credentials exist.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/enroll (the `EnrollNode` operationId).
func (*ClientWithResponses) GetActivityWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) GetActivityWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetActivityResponse, error)
GetActivityWithResponse Recent node activity (downloads, loads, evictions, declines)
The last 200 things the daemon did to its model store and runtimes, newest first, including everything the mesh did on the operator's behalf. In memory only; cleared on restart.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /api/v1/activity (the `GetActivity` operationId).
func (*ClientWithResponses) GetCatalogWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) GetCatalogWithResponse(ctx context.Context, params *GetCatalogParams, reqEditors ...RequestEditorFn) (*GetCatalogResponse, error)
GetCatalogWithResponse Model catalog merged with local state
Returns a wrapper object for the known response body format(s).
Corresponds with GET /api/v1/catalog (the `GetCatalog` operationId).
func (*ClientWithResponses) GetEarningsWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) GetEarningsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEarningsResponse, error)
GetEarningsWithResponse Earnings (ledger-backed when enrolled, else a labelled estimate)
Returns a wrapper object for the known response body format(s).
Corresponds with GET /api/v1/earnings (the `GetEarnings` operationId).
func (*ClientWithResponses) GetHealthWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)
GetHealthWithResponse Liveness probe
The one unauthenticated management route: `tera up`, service managers, and the desktop app probe it before they hold a token.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /api/v1/health (the `GetHealth` operationId).
func (*ClientWithResponses) GetLimitsWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) GetLimitsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetLimitsResponse, error)
GetLimitsWithResponse Live governor limits
Returns a wrapper object for the known response body format(s).
Corresponds with GET /api/v1/limits (the `GetLimits` operationId).
func (*ClientWithResponses) GetLogsWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) GetLogsWithResponse(ctx context.Context, params *GetLogsParams, reqEditors ...RequestEditorFn) (*GetLogsResponse, error)
GetLogsWithResponse Recent daemon log entries (ring buffer)
Returns a wrapper object for the known response body format(s).
Corresponds with GET /api/v1/logs (the `GetLogs` operationId).
func (*ClientWithResponses) GetStatusWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) GetStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)
GetStatusWithResponse Node status snapshot
Returns a wrapper object for the known response body format(s).
Corresponds with GET /api/v1/status (the `GetStatus` operationId).
func (*ClientWithResponses) ListModelsWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) ListModelsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListModelsResponse, error)
ListModelsWithResponse Locally installed models
Returns a wrapper object for the known response body format(s).
Corresponds with GET /api/v1/models (the `ListModels` operationId).
func (*ClientWithResponses) LoadModelWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) LoadModelWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*LoadModelResponse, error)
LoadModelWithResponse Load a model into the serving runtime
Synchronous — llama-server startup takes seconds and the caller wants the verdict. Downloads first if the artifact isn't cached.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/models/{id}/load (the `LoadModel` operationId).
func (*ClientWithResponses) PinModelWithBodyWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) PinModelWithBodyWithResponse(ctx context.Context, id ModelID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PinModelResponse, error)
PinModelWithBodyWithResponse Pin or unpin a model (pinned models are never LRU-evicted)
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/models/{id}/pin (the `PinModel` operationId).
func (*ClientWithResponses) PinModelWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) PinModelWithResponse(ctx context.Context, id ModelID, body PinModelJSONRequestBody, reqEditors ...RequestEditorFn) (*PinModelResponse, error)
PinModelWithResponse Pin or unpin a model (pinned models are never LRU-evicted)
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/models/{id}/pin (the `PinModel` operationId).
func (*ClientWithResponses) SetDefaultModelWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) SetDefaultModelWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*SetDefaultModelResponse, error)
SetDefaultModelWithResponse Serve this model when a request names none (must be loaded)
Returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/models/{id}/default (the `SetDefaultModel` operationId).
func (*ClientWithResponses) StartModelDownloadWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) StartModelDownloadWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*StartModelDownloadResponse, error)
StartModelDownloadWithResponse Start downloading a catalog model in the background
202 when a download starts (or is already in flight); 200 when the model is already cached and ready. Progress streams over `/api/v1/events` as `model_progress` and shows in `received_bytes` on the model list.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/models/{id}/download (the `StartModelDownload` operationId).
func (*ClientWithResponses) UnloadModelWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) UnloadModelWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*UnloadModelResponse, error)
UnloadModelWithResponse Unload a model from the runtime (the artifact stays cached)
Returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/models/{id}/unload (the `UnloadModel` operationId).
func (*ClientWithResponses) UpdateLimitsWithBodyWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) UpdateLimitsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateLimitsResponse, error)
UpdateLimitsWithBodyWithResponse Update governor limits
Applies live and persists to the daemon-owned `<data_dir>/limits.toml` overlay; the operator's config.toml is never rewritten.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /api/v1/limits (the `UpdateLimits` operationId).
func (*ClientWithResponses) UpdateLimitsWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) UpdateLimitsWithResponse(ctx context.Context, body UpdateLimitsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateLimitsResponse, error)
UpdateLimitsWithResponse Update governor limits
Applies live and persists to the daemon-owned `<data_dir>/limits.toml` overlay; the operator's config.toml is never rewritten.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /api/v1/limits (the `UpdateLimits` operationId).
type ClientWithResponsesInterface ¶ added in v0.6.0
type ClientWithResponsesInterface interface {
// GetActivityWithResponse Recent node activity (downloads, loads, evictions, declines)
//
// The last 200 things the daemon did to its model store and runtimes, newest first, including everything the mesh did on the operator's behalf. In memory only; cleared on restart.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /api/v1/activity (the `GetActivity` operationId).
GetActivityWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetActivityResponse, error)
// GetCatalogWithResponse Model catalog merged with local state
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /api/v1/catalog (the `GetCatalog` operationId).
GetCatalogWithResponse(ctx context.Context, params *GetCatalogParams, reqEditors ...RequestEditorFn) (*GetCatalogResponse, error)
// GetEarningsWithResponse Earnings (ledger-backed when enrolled, else a labelled estimate)
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /api/v1/earnings (the `GetEarnings` operationId).
GetEarningsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEarningsResponse, error)
// EnrollNodeWithBodyWithResponse Enroll (or re-enroll) this node with the coordinator
//
// Submits a claim code to the running daemon: enrollment plus a live tunnel (re)start, no restart required. Re-enrollment — needed when the mesh CA rotates — is only possible through this route; the startup path ignores claim codes while credentials exist.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/enroll (the `EnrollNode` operationId).
EnrollNodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EnrollNodeResponse, error)
// EnrollNodeWithResponse Enroll (or re-enroll) this node with the coordinator
//
// Submits a claim code to the running daemon: enrollment plus a live tunnel (re)start, no restart required. Re-enrollment — needed when the mesh CA rotates — is only possible through this route; the startup path ignores claim codes while credentials exist.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/enroll (the `EnrollNode` operationId).
EnrollNodeWithResponse(ctx context.Context, body EnrollNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*EnrollNodeResponse, error)
// GetHealthWithResponse Liveness probe
//
// The one unauthenticated management route: `tera up`, service managers, and the desktop app probe it before they hold a token.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /api/v1/health (the `GetHealth` operationId).
GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)
// GetLimitsWithResponse Live governor limits
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /api/v1/limits (the `GetLimits` operationId).
GetLimitsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetLimitsResponse, error)
// UpdateLimitsWithBodyWithResponse Update governor limits
//
// Applies live and persists to the daemon-owned `<data_dir>/limits.toml` overlay; the operator's config.toml is never rewritten.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /api/v1/limits (the `UpdateLimits` operationId).
UpdateLimitsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateLimitsResponse, error)
// UpdateLimitsWithResponse Update governor limits
//
// Applies live and persists to the daemon-owned `<data_dir>/limits.toml` overlay; the operator's config.toml is never rewritten.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /api/v1/limits (the `UpdateLimits` operationId).
UpdateLimitsWithResponse(ctx context.Context, body UpdateLimitsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateLimitsResponse, error)
// GetLogsWithResponse Recent daemon log entries (ring buffer)
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /api/v1/logs (the `GetLogs` operationId).
GetLogsWithResponse(ctx context.Context, params *GetLogsParams, reqEditors ...RequestEditorFn) (*GetLogsResponse, error)
// ListModelsWithResponse Locally installed models
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /api/v1/models (the `ListModels` operationId).
ListModelsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListModelsResponse, error)
// DeleteModelWithResponse Delete a model from disk (and unload it if loaded)
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /api/v1/models/{id} (the `DeleteModel` operationId).
DeleteModelWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*DeleteModelResponse, error)
// SetDefaultModelWithResponse Serve this model when a request names none (must be loaded)
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/models/{id}/default (the `SetDefaultModel` operationId).
SetDefaultModelWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*SetDefaultModelResponse, error)
// CancelModelDownloadWithResponse Cancel an in-flight download (the .partial file is kept for resume)
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /api/v1/models/{id}/download (the `CancelModelDownload` operationId).
CancelModelDownloadWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*CancelModelDownloadResponse, error)
// StartModelDownloadWithResponse Start downloading a catalog model in the background
//
// 202 when a download starts (or is already in flight); 200 when the model is already cached and ready. Progress streams over `/api/v1/events` as `model_progress` and shows in `received_bytes` on the model list.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/models/{id}/download (the `StartModelDownload` operationId).
StartModelDownloadWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*StartModelDownloadResponse, error)
// LoadModelWithResponse Load a model into the serving runtime
//
// Synchronous — llama-server startup takes seconds and the caller wants the verdict. Downloads first if the artifact isn't cached.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/models/{id}/load (the `LoadModel` operationId).
LoadModelWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*LoadModelResponse, error)
// PinModelWithBodyWithResponse Pin or unpin a model (pinned models are never LRU-evicted)
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/models/{id}/pin (the `PinModel` operationId).
PinModelWithBodyWithResponse(ctx context.Context, id ModelID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PinModelResponse, error)
// PinModelWithResponse Pin or unpin a model (pinned models are never LRU-evicted)
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/models/{id}/pin (the `PinModel` operationId).
PinModelWithResponse(ctx context.Context, id ModelID, body PinModelJSONRequestBody, reqEditors ...RequestEditorFn) (*PinModelResponse, error)
// UnloadModelWithResponse Unload a model from the runtime (the artifact stays cached)
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/models/{id}/unload (the `UnloadModel` operationId).
UnloadModelWithResponse(ctx context.Context, id ModelID, reqEditors ...RequestEditorFn) (*UnloadModelResponse, error)
// GetStatusWithResponse Node status snapshot
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /api/v1/status (the `GetStatus` operationId).
GetStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)
// CheckUpdateWithResponse Run a version check now
//
// Fetches the version feed immediately (the daemon otherwise checks on startup and hourly) and returns the result.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/update/check (the `CheckUpdate` operationId).
CheckUpdateWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CheckUpdateResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DeleteModelResponse ¶ added in v0.6.0
type DeleteModelResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Ok
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON501 the response for an HTTP 501 `application/json` response
JSON501 *Unsupported
}
func ParseDeleteModelResponse ¶ added in v0.6.0
func ParseDeleteModelResponse(rsp *http.Response) (*DeleteModelResponse, error)
ParseDeleteModelResponse parses an HTTP response from a DeleteModelWithResponse call
func (DeleteModelResponse) ContentType ¶ added in v0.6.0
func (r DeleteModelResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteModelResponse) GetBody ¶ added in v0.6.0
func (r DeleteModelResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (DeleteModelResponse) GetJSON200 ¶ added in v0.6.0
func (r DeleteModelResponse) GetJSON200() *Ok
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (DeleteModelResponse) GetJSON401 ¶ added in v0.6.0
func (r DeleteModelResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (DeleteModelResponse) GetJSON404 ¶ added in v0.6.0
func (r DeleteModelResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (DeleteModelResponse) GetJSON501 ¶ added in v0.6.0
func (r DeleteModelResponse) GetJSON501() *Unsupported
GetJSON501 returns the response for an HTTP 501 `application/json` response
func (DeleteModelResponse) Status ¶ added in v0.6.0
func (r DeleteModelResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteModelResponse) StatusCode ¶ added in v0.6.0
func (r DeleteModelResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Disk ¶ added in v0.4.0
type Disk struct {
BudgetBytes int64 `json:"budget_bytes"`
// Dir Absolute path of the model directory.
Dir string `json:"dir"`
FreeBytes int64 `json:"free_bytes"`
ModelsBytes int64 `json:"models_bytes"`
PartialBytes int64 `json:"partial_bytes"`
}
Disk Model store usage. `models_bytes` counts complete artifacts, `partial_bytes` counts resumable `.partial` downloads, `budget_bytes` is `models.max_disk_mb` (0 = unlimited), `free_bytes` is free space on the volume holding the model directory.
type DownloadStatus ¶
type DownloadStatus struct {
Ok bool `json:"ok"`
// State downloading | ready
State string `json:"state"`
}
DownloadStatus defines model for DownloadStatus.
type Earnings ¶
type Earnings struct {
// AsOf When the coordinator read the ledger (ledger only).
AsOf *time.Time `json:"as_of,omitempty"`
// CreditsPerUsd The coordinator's peg; dollars are credits divided by this (ledger only).
CreditsPerUsd *int64 `json:"credits_per_usd,omitempty"`
// Earned7dCredits Payout credits earned in the trailing seven days (ledger only).
Earned7dCredits *int64 `json:"earned_7d_credits,omitempty"`
EarnedCredits float64 `json:"earned_credits"`
EarnedMicrocredits int64 `json:"earned_microcredits"`
// EarnedTodayCredits Payout credits earned since 00:00 UTC (ledger only).
EarnedTodayCredits *int64 `json:"earned_today_credits,omitempty"`
EscrowCredits float64 `json:"escrow_credits"`
EstUsd float64 `json:"est_usd"`
EstUsdPerDay float64 `json:"est_usd_per_day"`
// LifetimePayoutCredits Payout credits earned since the account opened (ledger only).
LifetimePayoutCredits *int64 `json:"lifetime_payout_credits,omitempty"`
// LifetimeTokens Always this node's own count, whatever the source.
LifetimeTokens int64 `json:"lifetime_tokens"`
// NextVestAt When the oldest pending lot vests; absent with nothing pending.
NextVestAt *time.Time `json:"next_vest_at,omitempty"`
Note string `json:"note"`
// PendingCredits In escrow, vesting after the canary window (ledger only).
PendingCredits *int64 `json:"pending_credits,omitempty"`
// SettledCredits Vested, redeemable balance (ledger only).
SettledCredits *int64 `json:"settled_credits,omitempty"`
Source EarningsSource `json:"source"`
}
Earnings Earnings as this node knows them. `source: ledger` — the figures are the operator account's ledger position, pushed by the coordinator over the tunnel (every node of the operator together; settled = vested and redeemable, pending = in escrow until the canary window clears). `source: estimated` — no fresh ledger snapshot (standalone, not enrolled, or the tunnel has been down for two push intervals): a simulated figure from this node's own counters, labelled in `note`. The `*_credits` integer fields are ledger credits at `credits_per_usd`; the legacy `earned_credits` / `escrow_credits` doubles are those divided by 1e6.
type EarningsSource ¶ added in v0.6.1
type EarningsSource string
EarningsSource defines model for Earnings.Source.
const ( Estimated EarningsSource = "estimated" Ledger EarningsSource = "ledger" )
Defines values for EarningsSource.
func (EarningsSource) Valid ¶ added in v0.6.1
func (e EarningsSource) Valid() bool
Valid indicates whether the value is a known member of the EarningsSource enum.
type EnrollNodeJSONRequestBody ¶
type EnrollNodeJSONRequestBody = EnrollRequest
EnrollNodeJSONRequestBody defines body for EnrollNode for application/json ContentType.
type EnrollNodeResponse ¶ added in v0.6.0
type EnrollNodeResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *EnrollResponse
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *Error
// JSON501 the response for an HTTP 501 `application/json` response
JSON501 *Unsupported
// JSON502 the response for an HTTP 502 `application/json` response
JSON502 *Upstream
}
func ParseEnrollNodeResponse ¶ added in v0.6.0
func ParseEnrollNodeResponse(rsp *http.Response) (*EnrollNodeResponse, error)
ParseEnrollNodeResponse parses an HTTP response from a EnrollNodeWithResponse call
func (EnrollNodeResponse) ContentType ¶ added in v0.6.0
func (r EnrollNodeResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (EnrollNodeResponse) GetBody ¶ added in v0.6.0
func (r EnrollNodeResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (EnrollNodeResponse) GetJSON200 ¶ added in v0.6.0
func (r EnrollNodeResponse) GetJSON200() *EnrollResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (EnrollNodeResponse) GetJSON400 ¶ added in v0.6.0
func (r EnrollNodeResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (EnrollNodeResponse) GetJSON401 ¶ added in v0.6.0
func (r EnrollNodeResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (EnrollNodeResponse) GetJSON409 ¶ added in v0.6.0
func (r EnrollNodeResponse) GetJSON409() *Error
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (EnrollNodeResponse) GetJSON501 ¶ added in v0.6.0
func (r EnrollNodeResponse) GetJSON501() *Unsupported
GetJSON501 returns the response for an HTTP 501 `application/json` response
func (EnrollNodeResponse) GetJSON502 ¶ added in v0.6.0
func (r EnrollNodeResponse) GetJSON502() *Upstream
GetJSON502 returns the response for an HTTP 502 `application/json` response
func (EnrollNodeResponse) Status ¶ added in v0.6.0
func (r EnrollNodeResponse) Status() string
Status returns HTTPResponse.Status
func (EnrollNodeResponse) StatusCode ¶ added in v0.6.0
func (r EnrollNodeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type EnrollRequest ¶
type EnrollRequest struct {
ClaimCode string `json:"claim_code"`
}
EnrollRequest defines model for EnrollRequest.
type EnrollResponse ¶
type EnrollResponse struct {
CertExpiresAt time.Time `json:"cert_expires_at"`
NodeId string `json:"node_id"`
Ok bool `json:"ok"`
}
EnrollResponse defines model for EnrollResponse.
type Error ¶
type Error struct {
Error struct {
Message string `json:"message"`
Type string `json:"type"`
} `json:"error"`
}
Error defines model for Error.
type GetActivityResponse ¶ added in v0.6.0
type GetActivityResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *ActivityList
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
}
func ParseGetActivityResponse ¶ added in v0.6.0
func ParseGetActivityResponse(rsp *http.Response) (*GetActivityResponse, error)
ParseGetActivityResponse parses an HTTP response from a GetActivityWithResponse call
func (GetActivityResponse) ContentType ¶ added in v0.6.0
func (r GetActivityResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetActivityResponse) GetBody ¶ added in v0.6.0
func (r GetActivityResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetActivityResponse) GetJSON200 ¶ added in v0.6.0
func (r GetActivityResponse) GetJSON200() *ActivityList
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetActivityResponse) GetJSON401 ¶ added in v0.6.0
func (r GetActivityResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetActivityResponse) Status ¶ added in v0.6.0
func (r GetActivityResponse) Status() string
Status returns HTTPResponse.Status
func (GetActivityResponse) StatusCode ¶ added in v0.6.0
func (r GetActivityResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetCatalogParams ¶
type GetCatalogParams struct {
// Refresh Force a refetch instead of the cached copy (15 min TTL).
Refresh *bool `form:"refresh,omitempty" json:"refresh,omitempty"`
}
GetCatalogParams defines parameters for GetCatalog.
type GetCatalogResponse ¶ added in v0.6.0
type GetCatalogResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *CatalogList
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON501 the response for an HTTP 501 `application/json` response
JSON501 *Unsupported
// JSON502 the response for an HTTP 502 `application/json` response
JSON502 *Upstream
}
func ParseGetCatalogResponse ¶ added in v0.6.0
func ParseGetCatalogResponse(rsp *http.Response) (*GetCatalogResponse, error)
ParseGetCatalogResponse parses an HTTP response from a GetCatalogWithResponse call
func (GetCatalogResponse) ContentType ¶ added in v0.6.0
func (r GetCatalogResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetCatalogResponse) GetBody ¶ added in v0.6.0
func (r GetCatalogResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetCatalogResponse) GetJSON200 ¶ added in v0.6.0
func (r GetCatalogResponse) GetJSON200() *CatalogList
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetCatalogResponse) GetJSON401 ¶ added in v0.6.0
func (r GetCatalogResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetCatalogResponse) GetJSON501 ¶ added in v0.6.0
func (r GetCatalogResponse) GetJSON501() *Unsupported
GetJSON501 returns the response for an HTTP 501 `application/json` response
func (GetCatalogResponse) GetJSON502 ¶ added in v0.6.0
func (r GetCatalogResponse) GetJSON502() *Upstream
GetJSON502 returns the response for an HTTP 502 `application/json` response
func (GetCatalogResponse) Status ¶ added in v0.6.0
func (r GetCatalogResponse) Status() string
Status returns HTTPResponse.Status
func (GetCatalogResponse) StatusCode ¶ added in v0.6.0
func (r GetCatalogResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetEarningsResponse ¶ added in v0.6.0
type GetEarningsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Earnings
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
}
func ParseGetEarningsResponse ¶ added in v0.6.0
func ParseGetEarningsResponse(rsp *http.Response) (*GetEarningsResponse, error)
ParseGetEarningsResponse parses an HTTP response from a GetEarningsWithResponse call
func (GetEarningsResponse) ContentType ¶ added in v0.6.0
func (r GetEarningsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetEarningsResponse) GetBody ¶ added in v0.6.0
func (r GetEarningsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetEarningsResponse) GetJSON200 ¶ added in v0.6.0
func (r GetEarningsResponse) GetJSON200() *Earnings
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetEarningsResponse) GetJSON401 ¶ added in v0.6.0
func (r GetEarningsResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetEarningsResponse) Status ¶ added in v0.6.0
func (r GetEarningsResponse) Status() string
Status returns HTTPResponse.Status
func (GetEarningsResponse) StatusCode ¶ added in v0.6.0
func (r GetEarningsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetHealthResponse ¶ added in v0.6.0
type GetHealthResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Health
}
func ParseGetHealthResponse ¶ added in v0.6.0
func ParseGetHealthResponse(rsp *http.Response) (*GetHealthResponse, error)
ParseGetHealthResponse parses an HTTP response from a GetHealthWithResponse call
func (GetHealthResponse) ContentType ¶ added in v0.6.0
func (r GetHealthResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetHealthResponse) GetBody ¶ added in v0.6.0
func (r GetHealthResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetHealthResponse) GetJSON200 ¶ added in v0.6.0
func (r GetHealthResponse) GetJSON200() *Health
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetHealthResponse) Status ¶ added in v0.6.0
func (r GetHealthResponse) Status() string
Status returns HTTPResponse.Status
func (GetHealthResponse) StatusCode ¶ added in v0.6.0
func (r GetHealthResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetLimitsResponse ¶ added in v0.6.0
type GetLimitsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Limits
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON501 the response for an HTTP 501 `application/json` response
JSON501 *Unsupported
}
func ParseGetLimitsResponse ¶ added in v0.6.0
func ParseGetLimitsResponse(rsp *http.Response) (*GetLimitsResponse, error)
ParseGetLimitsResponse parses an HTTP response from a GetLimitsWithResponse call
func (GetLimitsResponse) ContentType ¶ added in v0.6.0
func (r GetLimitsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetLimitsResponse) GetBody ¶ added in v0.6.0
func (r GetLimitsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetLimitsResponse) GetJSON200 ¶ added in v0.6.0
func (r GetLimitsResponse) GetJSON200() *Limits
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetLimitsResponse) GetJSON401 ¶ added in v0.6.0
func (r GetLimitsResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetLimitsResponse) GetJSON501 ¶ added in v0.6.0
func (r GetLimitsResponse) GetJSON501() *Unsupported
GetJSON501 returns the response for an HTTP 501 `application/json` response
func (GetLimitsResponse) Status ¶ added in v0.6.0
func (r GetLimitsResponse) Status() string
Status returns HTTPResponse.Status
func (GetLimitsResponse) StatusCode ¶ added in v0.6.0
func (r GetLimitsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetLogsParams ¶
type GetLogsParams struct {
// N Max entries to return (default 200). `limit` is an accepted alias.
N *int `form:"n,omitempty" json:"n,omitempty"`
// Limit Alias for `n`.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
GetLogsParams defines parameters for GetLogs.
type GetLogsResponse ¶ added in v0.6.0
type GetLogsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *LogList
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
}
func ParseGetLogsResponse ¶ added in v0.6.0
func ParseGetLogsResponse(rsp *http.Response) (*GetLogsResponse, error)
ParseGetLogsResponse parses an HTTP response from a GetLogsWithResponse call
func (GetLogsResponse) ContentType ¶ added in v0.6.0
func (r GetLogsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetLogsResponse) GetBody ¶ added in v0.6.0
func (r GetLogsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetLogsResponse) GetJSON200 ¶ added in v0.6.0
func (r GetLogsResponse) GetJSON200() *LogList
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetLogsResponse) GetJSON401 ¶ added in v0.6.0
func (r GetLogsResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetLogsResponse) Status ¶ added in v0.6.0
func (r GetLogsResponse) Status() string
Status returns HTTPResponse.Status
func (GetLogsResponse) StatusCode ¶ added in v0.6.0
func (r GetLogsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetStatusResponse ¶ added in v0.6.0
type GetStatusResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Status
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
}
func ParseGetStatusResponse ¶ added in v0.6.0
func ParseGetStatusResponse(rsp *http.Response) (*GetStatusResponse, error)
ParseGetStatusResponse parses an HTTP response from a GetStatusWithResponse call
func (GetStatusResponse) ContentType ¶ added in v0.6.0
func (r GetStatusResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetStatusResponse) GetBody ¶ added in v0.6.0
func (r GetStatusResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetStatusResponse) GetJSON200 ¶ added in v0.6.0
func (r GetStatusResponse) GetJSON200() *Status
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetStatusResponse) GetJSON401 ¶ added in v0.6.0
func (r GetStatusResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetStatusResponse) Status ¶ added in v0.6.0
func (r GetStatusResponse) Status() string
Status returns HTTPResponse.Status
func (GetStatusResponse) StatusCode ¶ added in v0.6.0
func (r GetStatusResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Gpu ¶
type Gpu struct {
Accel string `json:"accel"`
Model string `json:"model"`
UnifiedMemory bool `json:"unified_memory"`
Vendor string `json:"vendor"`
VramMb int64 `json:"vram_mb"`
}
Gpu defines model for Gpu.
type Hardware ¶
type Hardware struct {
Arch string `json:"arch"`
CpuCores int64 `json:"cpu_cores"`
CpuModel string `json:"cpu_model"`
Gpus []Gpu `json:"gpus"`
Os string `json:"os"`
RamMb int64 `json:"ram_mb"`
}
Hardware defines model for Hardware.
type HttpRequestDoer ¶ added in v0.6.0
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type Limits ¶
type Limits struct {
IdleAfterSeconds int `json:"idle_after_seconds"`
// IdleUnloadSeconds Unload a loaded model after this long without a request (0 = never; default model exempt). Omitted on PUT = unchanged.
IdleUnloadSeconds *int `json:"idle_unload_seconds,omitempty"`
// MaxDiskMb Model store budget (`models.max_disk_mb`); 0 = unlimited. LRU eviction of unpinned models keeps the store under it. Omitted on PUT = unchanged.
MaxDiskMb *int64 `json:"max_disk_mb,omitempty"`
// MaxRamMb Memory budget for loaded models (`budget.max_ram_mb`); 0 = auto (about half of physical memory on unified-memory machines, the GPU budget on discrete GPUs). Omitted on PUT = unchanged.
MaxRamMb *int64 `json:"max_ram_mb,omitempty"`
MaxTempCelsius float64 `json:"max_temp_celsius"`
// MeshManaged Let the mesh place models on this node (download, load, and evict what it placed) inside `models.max_disk_mb`, minus your pinned and excluded models. Off means the node serves only what you installed. Omitted on PUT = unchanged.
MeshManaged *bool `json:"mesh_managed,omitempty"`
// RetentionDays Evict unpinned models not used for this many days (0 = never). Omitted on PUT = unchanged.
RetentionDays *int `json:"retention_days,omitempty"`
// Schedule Daily serving windows for serve_policy=scheduled, one per entry, each "HH:MM-HH:MM" in the node's local time on a 24-hour clock (the hour may be one or two digits, the minute must be two — Go's "15:04" layout). The end is exclusive: "09:00-17:00" serves 09:00 through 16:59. A start later than its end wraps overnight ("22:00-08:00"); "22:00-00:00" runs to midnight; a window whose start equals its end matches nothing, so a full day is ["00:00-12:00", "12:00-00:00"]. The same windows apply every day (there is no day-of-week syntax) and an empty list never serves. An entry the daemon can't parse fails the whole PUT with 400; reads return windows normalised to zero-padded "HH:MM-HH:MM".
Schedule []string `json:"schedule"`
ServeOnBattery bool `json:"serve_on_battery"`
// ServePolicy always | idle-only | scheduled
ServePolicy string `json:"serve_policy"`
YieldGraceSeconds int `json:"yield_grace_seconds"`
}
Limits defines model for Limits.
type ListModelsResponse ¶ added in v0.6.0
type ListModelsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *ModelList
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
}
func ParseListModelsResponse ¶ added in v0.6.0
func ParseListModelsResponse(rsp *http.Response) (*ListModelsResponse, error)
ParseListModelsResponse parses an HTTP response from a ListModelsWithResponse call
func (ListModelsResponse) ContentType ¶ added in v0.6.0
func (r ListModelsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListModelsResponse) GetBody ¶ added in v0.6.0
func (r ListModelsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListModelsResponse) GetJSON200 ¶ added in v0.6.0
func (r ListModelsResponse) GetJSON200() *ModelList
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListModelsResponse) GetJSON401 ¶ added in v0.6.0
func (r ListModelsResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (ListModelsResponse) Status ¶ added in v0.6.0
func (r ListModelsResponse) Status() string
Status returns HTTPResponse.Status
func (ListModelsResponse) StatusCode ¶ added in v0.6.0
func (r ListModelsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type LoadModelResponse ¶ added in v0.6.0
type LoadModelResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Ok
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON501 the response for an HTTP 501 `application/json` response
JSON501 *Unsupported
// JSON502 the response for an HTTP 502 `application/json` response
JSON502 *Upstream
}
func ParseLoadModelResponse ¶ added in v0.6.0
func ParseLoadModelResponse(rsp *http.Response) (*LoadModelResponse, error)
ParseLoadModelResponse parses an HTTP response from a LoadModelWithResponse call
func (LoadModelResponse) ContentType ¶ added in v0.6.0
func (r LoadModelResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (LoadModelResponse) GetBody ¶ added in v0.6.0
func (r LoadModelResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (LoadModelResponse) GetJSON200 ¶ added in v0.6.0
func (r LoadModelResponse) GetJSON200() *Ok
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (LoadModelResponse) GetJSON401 ¶ added in v0.6.0
func (r LoadModelResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (LoadModelResponse) GetJSON404 ¶ added in v0.6.0
func (r LoadModelResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (LoadModelResponse) GetJSON501 ¶ added in v0.6.0
func (r LoadModelResponse) GetJSON501() *Unsupported
GetJSON501 returns the response for an HTTP 501 `application/json` response
func (LoadModelResponse) GetJSON502 ¶ added in v0.6.0
func (r LoadModelResponse) GetJSON502() *Upstream
GetJSON502 returns the response for an HTTP 502 `application/json` response
func (LoadModelResponse) Status ¶ added in v0.6.0
func (r LoadModelResponse) Status() string
Status returns HTTPResponse.Status
func (LoadModelResponse) StatusCode ¶ added in v0.6.0
func (r LoadModelResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type LogEntry ¶
type LogEntry struct {
Attrs *string `json:"attrs,omitempty"`
Level string `json:"level"`
Message string `json:"message"`
Time time.Time `json:"time"`
}
LogEntry defines model for LogEntry.
type LogList ¶
type LogList struct {
Logs []LogEntry `json:"logs"`
}
LogList defines model for LogList.
type Memory ¶ added in v0.4.0
type Memory struct {
BudgetMb int64 `json:"budget_mb"`
TotalMb int64 `json:"total_mb"`
UsedMb int64 `json:"used_mb"`
}
Memory Model memory on this node. `used_mb` is the measured footprint of every loaded runtime (physical footprint / proportional set size, not RSS, so mmap'd weight pages shared with the page cache are not double counted). `budget_mb` is what the daemon lets loaded models use in total before it unloads idle instances or declines a load.
type ModelList ¶
type ModelList struct {
Models []ModelRow `json:"models"`
}
ModelList defines model for ModelList.
type ModelRow ¶
type ModelRow struct {
// Assignment Coordinator placement status for this model, when the mesh asked for it. Failures and refusals stay visible for ten minutes.
Assignment *Assignment `json:"assignment,omitempty"`
Default bool `json:"default"`
Id string `json:"id"`
// IdleSince Present while loaded and not serving; the daemon unloads the instance after `idle_unload_seconds` (default model exempt).
IdleSince *time.Time `json:"idle_since,omitempty"`
LastUsed time.Time `json:"last_used"`
Loaded bool `json:"loaded"`
// LoadedMb Measured memory footprint; present only while loaded.
LoadedMb *int64 `json:"loaded_mb,omitempty"`
// Origin Who installed it: `operator` (you, via the app/CLI/config) or `mesh` (coordinator placement). The mesh can only evict its own; yours are never touched.
Origin string `json:"origin"`
// PartsDone How many of `parts_total` are downloaded and verified; present with it. Shards download one at a time, so the one in flight is `parts_done + 1`.
PartsDone *int `json:"parts_done,omitempty"`
// PartsTotal Files in the artifact: the GGUF shards of a sharded model plus its mmproj sidecar when it has one. Present only for such multi-file models (a plain single-file model omits it). They live in `<models dir>/<id>/` under their upstream names; `path` is the first shard.
PartsTotal *int `json:"parts_total,omitempty"`
// Path Absolute artifact path; present when the file exists.
Path *string `json:"path,omitempty"`
Pinned bool `json:"pinned"`
// ReceivedBytes Live progress summed over every file of the artifact; present only while downloading.
ReceivedBytes *int64 `json:"received_bytes,omitempty"`
SizeBytes int64 `json:"size_bytes"`
// State assigned | downloading | ready | missing. `assigned` is a coordinator placement queued behind other work (nothing on disk yet). `missing` means the index knows the model but its file is gone from disk (deleted outside the daemon); it no longer counts against the budget and loads re-download it.
State string `json:"state"`
}
ModelRow defines model for ModelRow.
type PinModelJSONRequestBody ¶
type PinModelJSONRequestBody = PinRequest
PinModelJSONRequestBody defines body for PinModel for application/json ContentType.
type PinModelResponse ¶ added in v0.6.0
type PinModelResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Ok
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON501 the response for an HTTP 501 `application/json` response
JSON501 *Unsupported
}
func ParsePinModelResponse ¶ added in v0.6.0
func ParsePinModelResponse(rsp *http.Response) (*PinModelResponse, error)
ParsePinModelResponse parses an HTTP response from a PinModelWithResponse call
func (PinModelResponse) ContentType ¶ added in v0.6.0
func (r PinModelResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PinModelResponse) GetBody ¶ added in v0.6.0
func (r PinModelResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PinModelResponse) GetJSON200 ¶ added in v0.6.0
func (r PinModelResponse) GetJSON200() *Ok
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (PinModelResponse) GetJSON401 ¶ added in v0.6.0
func (r PinModelResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (PinModelResponse) GetJSON404 ¶ added in v0.6.0
func (r PinModelResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (PinModelResponse) GetJSON501 ¶ added in v0.6.0
func (r PinModelResponse) GetJSON501() *Unsupported
GetJSON501 returns the response for an HTTP 501 `application/json` response
func (PinModelResponse) Status ¶ added in v0.6.0
func (r PinModelResponse) Status() string
Status returns HTTPResponse.Status
func (PinModelResponse) StatusCode ¶ added in v0.6.0
func (r PinModelResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PinRequest ¶
type PinRequest struct {
Pinned bool `json:"pinned"`
}
PinRequest defines model for PinRequest.
type RequestEditorFn ¶ added in v0.6.0
RequestEditorFn is the function signature for the RequestEditor callback function
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type ServeMux ¶
type ServeMux interface {
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
http.Handler
}
ServeMux is an abstraction of http.ServeMux.
type ServerInterface ¶
type ServerInterface interface {
// GetActivity Recent node activity (downloads, loads, evictions, declines)
// (GET /api/v1/activity)
GetActivity(w http.ResponseWriter, r *http.Request)
// GetCatalog Model catalog merged with local state
// (GET /api/v1/catalog)
GetCatalog(w http.ResponseWriter, r *http.Request, params GetCatalogParams)
// GetEarnings Earnings (ledger-backed when enrolled, else a labelled estimate)
// (GET /api/v1/earnings)
GetEarnings(w http.ResponseWriter, r *http.Request)
// EnrollNode Enroll (or re-enroll) this node with the coordinator
// (POST /api/v1/enroll)
EnrollNode(w http.ResponseWriter, r *http.Request)
// GetHealth Liveness probe
// (GET /api/v1/health)
GetHealth(w http.ResponseWriter, r *http.Request)
// GetLimits Live governor limits
// (GET /api/v1/limits)
GetLimits(w http.ResponseWriter, r *http.Request)
// UpdateLimits Update governor limits
// (PUT /api/v1/limits)
UpdateLimits(w http.ResponseWriter, r *http.Request)
// GetLogs Recent daemon log entries (ring buffer)
// (GET /api/v1/logs)
GetLogs(w http.ResponseWriter, r *http.Request, params GetLogsParams)
// ListModels Locally installed models
// (GET /api/v1/models)
ListModels(w http.ResponseWriter, r *http.Request)
// DeleteModel Delete a model from disk (and unload it if loaded)
// (DELETE /api/v1/models/{id})
DeleteModel(w http.ResponseWriter, r *http.Request, id ModelID)
// SetDefaultModel Serve this model when a request names none (must be loaded)
// (POST /api/v1/models/{id}/default)
SetDefaultModel(w http.ResponseWriter, r *http.Request, id ModelID)
// CancelModelDownload Cancel an in-flight download (the .partial file is kept for resume)
// (DELETE /api/v1/models/{id}/download)
CancelModelDownload(w http.ResponseWriter, r *http.Request, id ModelID)
// StartModelDownload Start downloading a catalog model in the background
// (POST /api/v1/models/{id}/download)
StartModelDownload(w http.ResponseWriter, r *http.Request, id ModelID)
// LoadModel Load a model into the serving runtime
// (POST /api/v1/models/{id}/load)
LoadModel(w http.ResponseWriter, r *http.Request, id ModelID)
// PinModel Pin or unpin a model (pinned models are never LRU-evicted)
// (POST /api/v1/models/{id}/pin)
PinModel(w http.ResponseWriter, r *http.Request, id ModelID)
// UnloadModel Unload a model from the runtime (the artifact stays cached)
// (POST /api/v1/models/{id}/unload)
UnloadModel(w http.ResponseWriter, r *http.Request, id ModelID)
// GetStatus Node status snapshot
// (GET /api/v1/status)
GetStatus(w http.ResponseWriter, r *http.Request)
// CheckUpdate Run a version check now
// (POST /api/v1/update/check)
CheckUpdate(w http.ResponseWriter, r *http.Request)
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) CancelModelDownload ¶
func (siw *ServerInterfaceWrapper) CancelModelDownload(w http.ResponseWriter, r *http.Request)
CancelModelDownload operation middleware
func (*ServerInterfaceWrapper) CheckUpdate ¶ added in v0.4.0
func (siw *ServerInterfaceWrapper) CheckUpdate(w http.ResponseWriter, r *http.Request)
CheckUpdate operation middleware
func (*ServerInterfaceWrapper) DeleteModel ¶
func (siw *ServerInterfaceWrapper) DeleteModel(w http.ResponseWriter, r *http.Request)
DeleteModel operation middleware
func (*ServerInterfaceWrapper) EnrollNode ¶
func (siw *ServerInterfaceWrapper) EnrollNode(w http.ResponseWriter, r *http.Request)
EnrollNode operation middleware
func (*ServerInterfaceWrapper) GetActivity ¶ added in v0.4.0
func (siw *ServerInterfaceWrapper) GetActivity(w http.ResponseWriter, r *http.Request)
GetActivity operation middleware
func (*ServerInterfaceWrapper) GetCatalog ¶
func (siw *ServerInterfaceWrapper) GetCatalog(w http.ResponseWriter, r *http.Request)
GetCatalog operation middleware
func (*ServerInterfaceWrapper) GetEarnings ¶
func (siw *ServerInterfaceWrapper) GetEarnings(w http.ResponseWriter, r *http.Request)
GetEarnings operation middleware
func (*ServerInterfaceWrapper) GetHealth ¶
func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
GetHealth operation middleware
func (*ServerInterfaceWrapper) GetLimits ¶
func (siw *ServerInterfaceWrapper) GetLimits(w http.ResponseWriter, r *http.Request)
GetLimits operation middleware
func (*ServerInterfaceWrapper) GetLogs ¶
func (siw *ServerInterfaceWrapper) GetLogs(w http.ResponseWriter, r *http.Request)
GetLogs operation middleware
func (*ServerInterfaceWrapper) GetStatus ¶
func (siw *ServerInterfaceWrapper) GetStatus(w http.ResponseWriter, r *http.Request)
GetStatus operation middleware
func (*ServerInterfaceWrapper) ListModels ¶
func (siw *ServerInterfaceWrapper) ListModels(w http.ResponseWriter, r *http.Request)
ListModels operation middleware
func (*ServerInterfaceWrapper) LoadModel ¶
func (siw *ServerInterfaceWrapper) LoadModel(w http.ResponseWriter, r *http.Request)
LoadModel operation middleware
func (*ServerInterfaceWrapper) PinModel ¶
func (siw *ServerInterfaceWrapper) PinModel(w http.ResponseWriter, r *http.Request)
PinModel operation middleware
func (*ServerInterfaceWrapper) SetDefaultModel ¶
func (siw *ServerInterfaceWrapper) SetDefaultModel(w http.ResponseWriter, r *http.Request)
SetDefaultModel operation middleware
func (*ServerInterfaceWrapper) StartModelDownload ¶
func (siw *ServerInterfaceWrapper) StartModelDownload(w http.ResponseWriter, r *http.Request)
StartModelDownload operation middleware
func (*ServerInterfaceWrapper) UnloadModel ¶
func (siw *ServerInterfaceWrapper) UnloadModel(w http.ResponseWriter, r *http.Request)
UnloadModel operation middleware
func (*ServerInterfaceWrapper) UpdateLimits ¶
func (siw *ServerInterfaceWrapper) UpdateLimits(w http.ResponseWriter, r *http.Request)
UpdateLimits operation middleware
type SetDefaultModelResponse ¶ added in v0.6.0
type SetDefaultModelResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Ok
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON501 the response for an HTTP 501 `application/json` response
JSON501 *Unsupported
}
func ParseSetDefaultModelResponse ¶ added in v0.6.0
func ParseSetDefaultModelResponse(rsp *http.Response) (*SetDefaultModelResponse, error)
ParseSetDefaultModelResponse parses an HTTP response from a SetDefaultModelWithResponse call
func (SetDefaultModelResponse) ContentType ¶ added in v0.6.0
func (r SetDefaultModelResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (SetDefaultModelResponse) GetBody ¶ added in v0.6.0
func (r SetDefaultModelResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (SetDefaultModelResponse) GetJSON200 ¶ added in v0.6.0
func (r SetDefaultModelResponse) GetJSON200() *Ok
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (SetDefaultModelResponse) GetJSON401 ¶ added in v0.6.0
func (r SetDefaultModelResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (SetDefaultModelResponse) GetJSON404 ¶ added in v0.6.0
func (r SetDefaultModelResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (SetDefaultModelResponse) GetJSON501 ¶ added in v0.6.0
func (r SetDefaultModelResponse) GetJSON501() *Unsupported
GetJSON501 returns the response for an HTTP 501 `application/json` response
func (SetDefaultModelResponse) Status ¶ added in v0.6.0
func (r SetDefaultModelResponse) Status() string
Status returns HTTPResponse.Status
func (SetDefaultModelResponse) StatusCode ¶ added in v0.6.0
func (r SetDefaultModelResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type StartModelDownloadResponse ¶ added in v0.6.0
type StartModelDownloadResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *DownloadStatus
// JSON202 the response for an HTTP 202 `application/json` response
JSON202 *DownloadStatus
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON501 the response for an HTTP 501 `application/json` response
JSON501 *Unsupported
// JSON502 the response for an HTTP 502 `application/json` response
JSON502 *Upstream
}
func ParseStartModelDownloadResponse ¶ added in v0.6.0
func ParseStartModelDownloadResponse(rsp *http.Response) (*StartModelDownloadResponse, error)
ParseStartModelDownloadResponse parses an HTTP response from a StartModelDownloadWithResponse call
func (StartModelDownloadResponse) ContentType ¶ added in v0.6.0
func (r StartModelDownloadResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (StartModelDownloadResponse) GetBody ¶ added in v0.6.0
func (r StartModelDownloadResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (StartModelDownloadResponse) GetJSON200 ¶ added in v0.6.0
func (r StartModelDownloadResponse) GetJSON200() *DownloadStatus
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (StartModelDownloadResponse) GetJSON202 ¶ added in v0.6.0
func (r StartModelDownloadResponse) GetJSON202() *DownloadStatus
GetJSON202 returns the response for an HTTP 202 `application/json` response
func (StartModelDownloadResponse) GetJSON401 ¶ added in v0.6.0
func (r StartModelDownloadResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (StartModelDownloadResponse) GetJSON404 ¶ added in v0.6.0
func (r StartModelDownloadResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (StartModelDownloadResponse) GetJSON501 ¶ added in v0.6.0
func (r StartModelDownloadResponse) GetJSON501() *Unsupported
GetJSON501 returns the response for an HTTP 501 `application/json` response
func (StartModelDownloadResponse) GetJSON502 ¶ added in v0.6.0
func (r StartModelDownloadResponse) GetJSON502() *Upstream
GetJSON502 returns the response for an HTTP 502 `application/json` response
func (StartModelDownloadResponse) Status ¶ added in v0.6.0
func (r StartModelDownloadResponse) Status() string
Status returns HTTPResponse.Status
func (StartModelDownloadResponse) StatusCode ¶ added in v0.6.0
func (r StartModelDownloadResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Stats ¶
type Stats struct {
EarnedMicrocredits int64 `json:"earned_microcredits"`
Inflight int `json:"inflight"`
RequestsPerMin float64 `json:"requests_per_min"`
TokensPerSec1m float64 `json:"tokens_per_sec_1m"`
TotalRequests int64 `json:"total_requests"`
TotalTokens int64 `json:"total_tokens"`
}
Stats defines model for Stats.
type Status ¶
type Status struct {
// CertExpiresAt Client-certificate expiry; present when enrolled.
CertExpiresAt *time.Time `json:"cert_expires_at,omitempty"`
// CertRotationError Why the last due client-certificate rotation failed; absent when rotation is not due or succeeded. The node keeps serving on the current certificate and leaves the mesh when it expires unless a later restart rotates it or the node is re-enrolled.
CertRotationError *string `json:"cert_rotation_error,omitempty"`
DefaultModel string `json:"default_model"`
// Disk Model store usage. `models_bytes` counts complete artifacts, `partial_bytes` counts resumable `.partial` downloads, `budget_bytes` is `models.max_disk_mb` (0 = unlimited), `free_bytes` is free space on the volume holding the model directory.
Disk Disk `json:"disk"`
Enrolled bool `json:"enrolled"`
Hardware *Hardware `json:"hardware,omitempty"`
Inflight int `json:"inflight"`
// Memory Model memory on this node. `used_mb` is the measured footprint of every loaded runtime (physical footprint / proportional set size, not RSS, so mmap'd weight pages shared with the page cache are not double counted). `budget_mb` is what the daemon lets loaded models use in total before it unloads idle instances or declines a load.
Memory Memory `json:"memory"`
ModelsLoaded int `json:"models_loaded"`
// NodeId Key fingerprint until enrolled; coordinator-assigned id after.
NodeId string `json:"node_id"`
OnBattery bool `json:"on_battery"`
// RuntimeAccel Accelerator backend of the llama-server build this node runs (`cuda12`, `rocm`, `vulkan`, `metal`, `cpu-avx2`, `cpu`): the first lane of the detection preference chain (cuda12 > rocm > vulkan > cpu) that the pinned runtime manifest publishes, so it can differ from `hardware.gpus[].accel` — an AMD box serves on `vulkan` while no ROCm build is published. Absent for the mock runtime.
RuntimeAccel *string `json:"runtime_accel,omitempty"`
Standalone bool `json:"standalone"`
// State serving | yielded | paused-battery | paused-thermal | outside-schedule
State string `json:"state"`
Stats Stats `json:"stats"`
TempCelsius float64 `json:"temp_celsius"`
// Update Result of the last version check against the mesh's version feed. `minimum` is the oldest daemon the coordinator still serves; below it the node is drained until updated.
Update *Update `json:"update,omitempty"`
UptimeSeconds int64 `json:"uptime_seconds"`
Version string `json:"version"`
}
Status defines model for Status.
type StdHTTPServerOptions ¶
type StdHTTPServerOptions struct {
BaseURL string
BaseRouter ServeMux
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnloadModelResponse ¶ added in v0.6.0
type UnloadModelResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Ok
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON501 the response for an HTTP 501 `application/json` response
JSON501 *Unsupported
}
func ParseUnloadModelResponse ¶ added in v0.6.0
func ParseUnloadModelResponse(rsp *http.Response) (*UnloadModelResponse, error)
ParseUnloadModelResponse parses an HTTP response from a UnloadModelWithResponse call
func (UnloadModelResponse) ContentType ¶ added in v0.6.0
func (r UnloadModelResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UnloadModelResponse) GetBody ¶ added in v0.6.0
func (r UnloadModelResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (UnloadModelResponse) GetJSON200 ¶ added in v0.6.0
func (r UnloadModelResponse) GetJSON200() *Ok
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (UnloadModelResponse) GetJSON401 ¶ added in v0.6.0
func (r UnloadModelResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (UnloadModelResponse) GetJSON404 ¶ added in v0.6.0
func (r UnloadModelResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (UnloadModelResponse) GetJSON501 ¶ added in v0.6.0
func (r UnloadModelResponse) GetJSON501() *Unsupported
GetJSON501 returns the response for an HTTP 501 `application/json` response
func (UnloadModelResponse) Status ¶ added in v0.6.0
func (r UnloadModelResponse) Status() string
Status returns HTTPResponse.Status
func (UnloadModelResponse) StatusCode ¶ added in v0.6.0
func (r UnloadModelResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type Update ¶ added in v0.4.0
type Update struct {
Available bool `json:"available"`
BelowMinimum *bool `json:"below_minimum,omitempty"`
CheckedAt time.Time `json:"checked_at"`
Current string `json:"current"`
Latest string `json:"latest"`
Minimum *string `json:"minimum,omitempty"`
// Url Release page / download for `latest`.
Url *string `json:"url,omitempty"`
}
Update Result of the last version check against the mesh's version feed. `minimum` is the oldest daemon the coordinator still serves; below it the node is drained until updated.
type UpdateLimitsJSONRequestBody ¶
type UpdateLimitsJSONRequestBody = Limits
UpdateLimitsJSONRequestBody defines body for UpdateLimits for application/json ContentType.
type UpdateLimitsResponse ¶ added in v0.6.0
type UpdateLimitsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Limits
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON501 the response for an HTTP 501 `application/json` response
JSON501 *Unsupported
}
func ParseUpdateLimitsResponse ¶ added in v0.6.0
func ParseUpdateLimitsResponse(rsp *http.Response) (*UpdateLimitsResponse, error)
ParseUpdateLimitsResponse parses an HTTP response from a UpdateLimitsWithResponse call
func (UpdateLimitsResponse) ContentType ¶ added in v0.6.0
func (r UpdateLimitsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateLimitsResponse) GetBody ¶ added in v0.6.0
func (r UpdateLimitsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (UpdateLimitsResponse) GetJSON200 ¶ added in v0.6.0
func (r UpdateLimitsResponse) GetJSON200() *Limits
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (UpdateLimitsResponse) GetJSON400 ¶ added in v0.6.0
func (r UpdateLimitsResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (UpdateLimitsResponse) GetJSON401 ¶ added in v0.6.0
func (r UpdateLimitsResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (UpdateLimitsResponse) GetJSON501 ¶ added in v0.6.0
func (r UpdateLimitsResponse) GetJSON501() *Unsupported
GetJSON501 returns the response for an HTTP 501 `application/json` response
func (UpdateLimitsResponse) Status ¶ added in v0.6.0
func (r UpdateLimitsResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateLimitsResponse) StatusCode ¶ added in v0.6.0
func (r UpdateLimitsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode