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 NewGetRequestsRequest(server string, params *GetRequestsParams) (*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) GetRequests(ctx context.Context, params *GetRequestsParams, 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) GetRequestsWithResponse(ctx context.Context, params *GetRequestsParams, reqEditors ...RequestEditorFn) (*GetRequestsResponse, 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 FinishedRequest
- 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 GetRequestsParams
- type GetRequestsResponse
- func (r GetRequestsResponse) ContentType() string
- func (r GetRequestsResponse) GetBody() []byte
- func (r GetRequestsResponse) GetJSON200() *RequestActivity
- func (r GetRequestsResponse) GetJSON401() *Unauthorized
- func (r GetRequestsResponse) Status() string
- func (r GetRequestsResponse) StatusCode() int
- type GetStatusResponse
- type Gpu
- type Hardware
- type Health
- type HttpRequestDoer
- type InflightRequest
- type InvalidParamFormatError
- type LimitSetting
- type LimitSettingApply
- type LimitSettingTier
- type LimitSettingType
- type Limits
- type LimitsLogLevel
- 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 ModelActivity
- type ModelActivityKind
- type ModelID
- type ModelList
- type ModelOperation
- type ModelOperationOp
- type ModelRow
- type NodeActivity
- 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 RequestActivity
- type RequestEditorFn
- type RequestKind
- type RequestOrigin
- type RequestOutcome
- 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) GetRequests(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) GetJSON400() *BadRequest
- 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 NewGetRequestsRequest ¶ added in v0.7.3
func NewGetRequestsRequest(server string, params *GetRequestsParams) (*http.Request, error)
NewGetRequestsRequest constructs an http.Request for the GetRequests 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"`
// Reason Why the mesh asked for it: `floor` | `demand` | `warm` | `stage` (see ModelRow.placement_reason). Absent when the coordinator did not say.
Reason *string `json:"reason,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"`
// Decision A typed decision model: served by `POST /v1/systemone`, never by the chat endpoints. Mutually exclusive with `embeddings`.
Decision bool `json:"decision"`
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) GetRequests ¶ added in v0.7.3
func (c *Client) GetRequests(ctx context.Context, params *GetRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetRequests What the node is doing right now, and what it did recently
The live activity view: per loaded model the requests in flight, every in-flight request (kind, origin, elapsed, tokens so far), model operations that use the machine without a request (a runtime starting, a download), and the last finished requests (a bounded in-memory list of the last 200, newest first) — enough to answer "what was that GPU spike two minutes ago".
Facts only, never content: no prompt, no output, no error text and no identifier from outside the node (`id` is a counter local to this daemon process, there to match `request_started` / `request_finished` events). A request appears once it has passed admission and reached the runtime; one refused before that (node yielded, unknown model) did no work and is not listed.
Live updates: the `request_started` and `request_finished` SSE events carry the same objects, and every `status` event carries `activity` (the `models` and `operations` parts).
Corresponds with GET /api/v1/requests (the `GetRequests` 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)
Takes effect at once and is remembered: the choice is saved as `default_model` (limits.toml), so it is also the model the daemon loads, and makes the default, when it next starts. Only a chat model can be the default: a decision or embedding model is refused with `400`. With no chat model loaded the node has no default (`status.default_model` is empty).
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)
//
// Takes effect at once and is remembered: the choice is saved as `default_model` (limits.toml), so it is also the model the daemon loads, and makes the default, when it next starts. Only a chat model can be the default: a decision or embedding model is refused with `400`. With no chat model loaded the node has no default (`status.default_model` is empty).
//
// 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)
// GetRequests What the node is doing right now, and what it did recently
//
// The live activity view: per loaded model the requests in flight,
// every in-flight request (kind, origin, elapsed, tokens so far),
// model operations that use the machine without a request (a runtime
// starting, a download), and the last finished requests (a bounded
// in-memory list of the last 200, newest first) — enough to answer "what was
// that GPU spike two minutes ago".
//
// Facts only, never content: no prompt, no output, no error text and
// no identifier from outside the node (`id` is a counter local to
// this daemon process, there to match `request_started` /
// `request_finished` events). A request appears once it has passed
// admission and reached the runtime; one refused before that (node
// yielded, unknown model) did no work and is not listed.
//
// Live updates: the `request_started` and `request_finished` SSE
// events carry the same objects, and every `status` event carries
// `activity` (the `models` and `operations` parts).
//
// Corresponds with GET /api/v1/requests (the `GetRequests` operationId).
GetRequests(ctx context.Context, params *GetRequestsParams, 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) GetRequestsWithResponse ¶ added in v0.7.3
func (c *ClientWithResponses) GetRequestsWithResponse(ctx context.Context, params *GetRequestsParams, reqEditors ...RequestEditorFn) (*GetRequestsResponse, error)
GetRequestsWithResponse What the node is doing right now, and what it did recently
The live activity view: per loaded model the requests in flight, every in-flight request (kind, origin, elapsed, tokens so far), model operations that use the machine without a request (a runtime starting, a download), and the last finished requests (a bounded in-memory list of the last 200, newest first) — enough to answer "what was that GPU spike two minutes ago".
Facts only, never content: no prompt, no output, no error text and no identifier from outside the node (`id` is a counter local to this daemon process, there to match `request_started` / `request_finished` events). A request appears once it has passed admission and reached the runtime; one refused before that (node yielded, unknown model) did no work and is not listed.
Live updates: the `request_started` and `request_finished` SSE events carry the same objects, and every `status` event carries `activity` (the `models` and `operations` parts).
Returns a wrapper object for the known response body format(s).
Corresponds with GET /api/v1/requests (the `GetRequests` 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)
Takes effect at once and is remembered: the choice is saved as `default_model` (limits.toml), so it is also the model the daemon loads, and makes the default, when it next starts. Only a chat model can be the default: a decision or embedding model is refused with `400`. With no chat model loaded the node has no default (`status.default_model` is empty).
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)
//
// Takes effect at once and is remembered: the choice is saved as `default_model` (limits.toml), so it is also the model the daemon loads, and makes the default, when it next starts. Only a chat model can be the default: a decision or embedding model is refused with `400`. With no chat model loaded the node has no default (`status.default_model` is empty).
//
// 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)
// GetRequestsWithResponse What the node is doing right now, and what it did recently
//
// The live activity view: per loaded model the requests in flight,
// every in-flight request (kind, origin, elapsed, tokens so far),
// model operations that use the machine without a request (a runtime
// starting, a download), and the last finished requests (a bounded
// in-memory list of the last 200, newest first) — enough to answer "what was
// that GPU spike two minutes ago".
//
// Facts only, never content: no prompt, no output, no error text and
// no identifier from outside the node (`id` is a counter local to
// this daemon process, there to match `request_started` /
// `request_finished` events). A request appears once it has passed
// admission and reached the runtime; one refused before that (node
// yielded, unknown model) did no work and is not listed.
//
// Live updates: the `request_started` and `request_finished` SSE
// events carry the same objects, and every `status` event carries
// `activity` (the `models` and `operations` parts).
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /api/v1/requests (the `GetRequests` operationId).
GetRequestsWithResponse(ctx context.Context, params *GetRequestsParams, reqEditors ...RequestEditorFn) (*GetRequestsResponse, 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 `estimated` source: this daemon run's estimated earnings projected to a day (session figure over uptime).
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: tokens generated since `stats.lifetime_since`, across daemon restarts.
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 {
// Code Machine-readable code where one exists (`model_not_found`).
Code *string `json:"code,omitempty"`
Message string `json:"message"`
Type string `json:"type"`
} `json:"error"`
}
Error defines model for Error.
type FinishedRequest ¶ added in v0.7.3
type FinishedRequest struct {
// CompletionTokens Generated tokens: the runtime's usage figure, or the count streamed before a cancellation. 0 for embeddings and decisions.
CompletionTokens int `json:"completion_tokens"`
DurationMs int64 `json:"duration_ms"`
Id string `json:"id"`
// Kind What the request asks of the model.
Kind RequestKind `json:"kind"`
Model string `json:"model"`
// Origin Who asked. `local`: this machine's local API (`/v1/*`). `mesh`: a coordinator dispatch — a customer request or a canary; a node cannot tell the two apart, by design. `challenge`: a fingerprint challenge from the coordinator.
Origin RequestOrigin `json:"origin"`
// Outcome `ok`: ran to completion. `cancelled`: stopped by the caller, the coordinator, a deadline or the governor (operator back at the machine). `invalid_input`: the runtime rejected the input itself (prompt over the model's context, too many options). `error`: anything else.
Outcome RequestOutcome `json:"outcome"`
// PromptTokens 0 when the runtime reported no usage (cancelled, failed).
PromptTokens int `json:"prompt_tokens"`
StartedAt time.Time `json:"started_at"`
}
FinishedRequest A request that ended. No content.
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 GetRequestsParams ¶ added in v0.7.3
type GetRequestsParams struct {
// Recent Max finished requests to return (default 50; 0 = none).
Recent *int `form:"recent,omitempty" json:"recent,omitempty"`
}
GetRequestsParams defines parameters for GetRequests.
type GetRequestsResponse ¶ added in v0.7.3
type GetRequestsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *RequestActivity
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
}
func ParseGetRequestsResponse ¶ added in v0.7.3
func ParseGetRequestsResponse(rsp *http.Response) (*GetRequestsResponse, error)
ParseGetRequestsResponse parses an HTTP response from a GetRequestsWithResponse call
func (GetRequestsResponse) ContentType ¶ added in v0.7.3
func (r GetRequestsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetRequestsResponse) GetBody ¶ added in v0.7.3
func (r GetRequestsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetRequestsResponse) GetJSON200 ¶ added in v0.7.3
func (r GetRequestsResponse) GetJSON200() *RequestActivity
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetRequestsResponse) GetJSON401 ¶ added in v0.7.3
func (r GetRequestsResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetRequestsResponse) Status ¶ added in v0.7.3
func (r GetRequestsResponse) Status() string
Status returns HTTPResponse.Status
func (GetRequestsResponse) StatusCode ¶ added in v0.7.3
func (r GetRequestsResponse) 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 InflightRequest ¶ added in v0.7.3
type InflightRequest struct {
ElapsedMs int64 `json:"elapsed_ms"`
// Id Local to this daemon process (`r<counter>`); matches the `request_finished` event and the FinishedRequest row.
Id string `json:"id"`
// Kind What the request asks of the model.
Kind RequestKind `json:"kind"`
Model string `json:"model"`
// Origin Who asked. `local`: this machine's local API (`/v1/*`). `mesh`: a coordinator dispatch — a customer request or a canary; a node cannot tell the two apart, by design. `challenge`: a fingerprint challenge from the coordinator.
Origin RequestOrigin `json:"origin"`
StartedAt time.Time `json:"started_at"`
// Tokens Tokens generated so far (reasoning included). Always 0 for embeddings and decisions, which generate nothing.
Tokens int `json:"tokens"`
}
InflightRequest A request a runtime is serving right now. No content.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type LimitSetting ¶ added in v0.7.4
type LimitSetting struct {
// Apply How the daemon applies a change. `live`: immediately. `reload`: by restarting the runtimes of idle loaded models right away; a model with a request in flight keeps its layout until its next load. `restart`: saved now, used from the next daemon start (`pending_restart` is true until then).
Apply LimitSettingApply `json:"apply"`
// ConfigKey The same setting in config.toml (`budget.max_concurrent`).
ConfigKey string `json:"config_key"`
// Configured The value as set (config.toml, limits.toml or this API): what GET returns in the field itself.
Configured interface{} `json:"configured"`
// Default The built-in default (the value's own JSON type).
Default interface{} `json:"default"`
// Description Help text (the field's description, in one paragraph).
Description string `json:"description"`
// Effective Present when the daemon is running with something other than `configured`: an `auto` (0) resolved for this machine (`max_concurrent` 0 -> 16), or the previous value of a `restart` setting whose change is pending.
Effective interface{} `json:"effective,omitempty"`
// Key The field's name in Limits (`max_concurrent`).
Key string `json:"key"`
// Max Largest accepted value; absent = unbounded.
Max *float32 `json:"max,omitempty"`
// Min Smallest accepted value (integer and number types).
Min *float32 `json:"min,omitempty"`
// Options The accepted values of an `enum`.
Options *[]string `json:"options,omitempty"`
// PendingRestart A change is saved but the daemon must restart to use it.
PendingRestart bool `json:"pending_restart"`
// Tier `common`: show by default. `advanced`: show under an Advanced section.
Tier LimitSettingTier `json:"tier"`
// Title Short label.
Title string `json:"title"`
// Type How to edit the value.
Type LimitSettingType `json:"type"`
// Unit Unit of an integer or number: seconds, MB, tokens, days, percent, °C, slots.
Unit *string `json:"unit,omitempty"`
// ZeroMeans What the value 0 means when it is special ("auto", "never", "unlimited").
ZeroMeans *string `json:"zero_means,omitempty"`
}
LimitSetting Metadata and current state of one Limits field.
type LimitSettingApply ¶ added in v0.7.4
type LimitSettingApply string
LimitSettingApply How the daemon applies a change. `live`: immediately. `reload`: by restarting the runtimes of idle loaded models right away; a model with a request in flight keeps its layout until its next load. `restart`: saved now, used from the next daemon start (`pending_restart` is true until then).
const ( Live LimitSettingApply = "live" Reload LimitSettingApply = "reload" Restart LimitSettingApply = "restart" )
Defines values for LimitSettingApply.
func (LimitSettingApply) Valid ¶ added in v0.7.4
func (e LimitSettingApply) Valid() bool
Valid indicates whether the value is a known member of the LimitSettingApply enum.
type LimitSettingTier ¶ added in v0.7.4
type LimitSettingTier string
LimitSettingTier `common`: show by default. `advanced`: show under an Advanced section.
const ( Advanced LimitSettingTier = "advanced" Common LimitSettingTier = "common" )
Defines values for LimitSettingTier.
func (LimitSettingTier) Valid ¶ added in v0.7.4
func (e LimitSettingTier) Valid() bool
Valid indicates whether the value is a known member of the LimitSettingTier enum.
type LimitSettingType ¶ added in v0.7.4
type LimitSettingType string
LimitSettingType How to edit the value.
const ( Boolean LimitSettingType = "boolean" Enum LimitSettingType = "enum" Integer LimitSettingType = "integer" Number LimitSettingType = "number" String LimitSettingType = "string" StringList LimitSettingType = "string_list" )
Defines values for LimitSettingType.
func (LimitSettingType) Valid ¶ added in v0.7.4
func (e LimitSettingType) Valid() bool
Valid indicates whether the value is a known member of the LimitSettingType enum.
type Limits ¶
type Limits struct {
// ContextLength Pin every request's context to exactly this many tokens (`runtime.context_length`), for every model, decision models included; 0 = plan it from memory (recommended). 256 and up. Applied like `max_concurrent`. Omitted on PUT = unchanged.
ContextLength *int `json:"context_length,omitempty"`
// DefaultModel The node's default model (`models.default`): the one that answers requests naming no model, and the one the daemon loads when it starts. Setting it makes the model the default now (loading it first if it is on disk but not loaded); `POST /api/v1/models/{id}/default` sets the same value. Must be a chat model. Empty or `none` = load nothing at start (a running default stays until the daemon restarts). Omitted on PUT = unchanged.
DefaultModel *string `json:"default_model,omitempty"`
// Exclude Model ids the mesh may never place on this node (`models.exclude`). Applies to the next placement; a model already placed stays until evicted. Omitted on PUT = unchanged.
Exclude *[]string `json:"exclude,omitempty"`
// IdleAfterSeconds With `idle-only`, how long keyboard and mouse must be quiet before the node starts serving. 0 on PUT = unchanged.
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"`
// LogLevel Daemon log verbosity (`log.level`). Applied immediately. Omitted on PUT = unchanged.
LogLevel *LimitsLogLevel `json:"log_level,omitempty"`
// MaxConcurrent Most requests one model serves at once (`budget.max_concurrent`): the ceiling on a model's slots and on mesh dispatches to this node. 0 = auto (16 with a GPU or unified memory, 2 on CPU). A chat model starts at `min_concurrent` slots and grows toward this ceiling under demand; every slot holds its own context in memory, so a lower ceiling leaves room for more models. Applied by restarting idle models; a busy one changes at its next load. Omitted on PUT = unchanged.
MaxConcurrent *int `json:"max_concurrent,omitempty"`
// MaxContext Largest context, in tokens, a single request gets (`runtime.max_context`); 0 = the model's own window. Memory per model grows with slots x context. 0, or 1024 and up. Applied like `max_concurrent`. Omitted on PUT = unchanged.
MaxContext *int `json:"max_context,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 Pause serving above this temperature; 0 disables the check.
MaxTempCelsius float64 `json:"max_temp_celsius"`
// MaxVramPercent Share of GPU memory models may use (`budget.max_vram_percent`): sizes the automatic memory budget on discrete GPUs and how many layers are offloaded. Takes effect after a daemon restart. Omitted on PUT = unchanged.
MaxVramPercent *int `json:"max_vram_percent,omitempty"`
// 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"`
// MinConcurrent Slots a chat model starts with (`budget.min_concurrent`). The node adds slots, up to `max_concurrent`, while requests are waiting, and gives them back when demand is gone or another model needs the memory. 0 = auto (2). Set it to `max_concurrent` (or higher) to pin the slot count. Applied like `max_concurrent`. Omitted on PUT = unchanged.
MinConcurrent *int `json:"min_concurrent,omitempty"`
// MinContext Smallest context a request is given (`runtime.min_context`): when memory is short the node gives up slots before going below it. 0 = 8192; otherwise 256 and up, and not above `max_context`. Applied like `max_concurrent`. Omitted on PUT = unchanged.
MinContext *int `json:"min_context,omitempty"`
// RequireAuthV1 Require the bearer token on the local inference routes (`/v1/*`) too (`local_api.require_auth_v1`). Off, any program on this machine can use the loaded models without a key. Applied immediately. Omitted on PUT = unchanged.
RequireAuthV1 *bool `json:"require_auth_v1,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 Serve while running on battery power.
ServeOnBattery bool `json:"serve_on_battery"`
// ServePolicy always | idle-only | scheduled. When this machine serves the mesh. `idle-only`: only while you are away from the keyboard and mouse. `scheduled`: only inside the schedule windows. `always`: whenever it is on.
ServePolicy string `json:"serve_policy"`
// Settings One entry per field above, in display order: everything an app needs to render the setting. Returned by GET and PUT; ignored when sent.
Settings *[]LimitSetting `json:"settings,omitempty"`
// YieldGraceSeconds When you come back to the machine, how long a request in flight may run on before it is cancelled. 0 on PUT = unchanged.
YieldGraceSeconds int `json:"yield_grace_seconds"`
}
Limits The operator's settings. GET returns every field plus `settings` (metadata for each: tier, how a change is applied, default, range, configured vs effective value). PUT takes the same object: the six required fields always, any other field only when it changes (omitted = unchanged); `settings` is ignored on PUT. The whole PUT is validated before anything is applied. Values persist in `<data_dir>/limits.toml`, which overrides `config.toml`.
type LimitsLogLevel ¶ added in v0.7.4
type LimitsLogLevel string
LimitsLogLevel Daemon log verbosity (`log.level`). Applied immediately. Omitted on PUT = unchanged.
const ( LimitsLogLevelDebug LimitsLogLevel = "debug" LimitsLogLevelError LimitsLogLevel = "error" LimitsLogLevelInfo LimitsLogLevel = "info" LimitsLogLevelWarn LimitsLogLevel = "warn" )
Defines values for LimitsLogLevel.
func (LimitsLogLevel) Valid ¶ added in v0.7.4
func (e LimitsLogLevel) Valid() bool
Valid indicates whether the value is a known member of the LimitsLogLevel enum.
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 ModelActivity ¶ added in v0.7.3
type ModelActivity struct {
// IdleSeconds Present while nothing is in flight: seconds since the last request started (since the load when there was none).
IdleSeconds *int64 `json:"idle_seconds,omitempty"`
// Inflight Requests this model's runtime is serving right now.
Inflight int `json:"inflight"`
// InflightByKind The same, by RequestKind (only kinds that are in flight).
InflightByKind map[string]int `json:"inflight_by_kind"`
// Kind What the model is for (catalog flags).
Kind ModelActivityKind `json:"kind"`
// LastRequestAt When the most recent request started. Set the moment a request starts, so it is always present while `inflight` > 0; absent only when the model has served none since it was loaded.
LastRequestAt *time.Time `json:"last_request_at,omitempty"`
Model string `json:"model"`
}
ModelActivity One loaded model, and what it is doing.
type ModelActivityKind ¶ added in v0.7.3
type ModelActivityKind string
ModelActivityKind What the model is for (catalog flags).
const ( ModelActivityKindChat ModelActivityKind = "chat" ModelActivityKindDecision ModelActivityKind = "decision" ModelActivityKindEmbedding ModelActivityKind = "embedding" )
Defines values for ModelActivityKind.
func (ModelActivityKind) Valid ¶ added in v0.7.3
func (e ModelActivityKind) Valid() bool
Valid indicates whether the value is a known member of the ModelActivityKind enum.
type ModelList ¶
type ModelList struct {
Models []ModelRow `json:"models"`
}
ModelList defines model for ModelList.
type ModelOperation ¶ added in v0.7.3
type ModelOperation struct {
Model string `json:"model"`
Op ModelOperationOp `json:"op"`
// ReceivedBytes Present for `downloading`.
ReceivedBytes *int64 `json:"received_bytes,omitempty"`
// StartedAt Present for `loading`.
StartedAt *time.Time `json:"started_at,omitempty"`
// TotalBytes Present for `downloading`.
TotalBytes *int64 `json:"total_bytes,omitempty"`
}
ModelOperation Work on a model that uses the machine without a request: `loading` (a runtime starting: weights read into memory, GPU warm-up) or `downloading`.
type ModelOperationOp ¶ added in v0.7.3
type ModelOperationOp string
ModelOperationOp defines model for ModelOperation.Op.
const ( Downloading ModelOperationOp = "downloading" Loading ModelOperationOp = "loading" )
Defines values for ModelOperationOp.
func (ModelOperationOp) Valid ¶ added in v0.7.3
func (e ModelOperationOp) Valid() bool
Valid indicates whether the value is a known member of the ModelOperationOp enum.
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"`
// ContextPerSlot Present while loaded; tokens of context each request gets.
ContextPerSlot *int `json:"context_per_slot,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"`
// PlacementReason Why the mesh placed this model, when it did and said so: `floor` (the mesh floor keeps a copy warm somewhere), `demand` (customers are requesting it), `warm` (a customer's request found no node holding it) or `stage` (downloaded ahead by the floor, not loaded). Remembered on the model's cache entry across restarts; absent for models you installed and for placements by a coordinator that sends no reason.
PlacementReason *string `json:"placement_reason,omitempty"`
// 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"`
// Slots Present while loaded: requests the model serves at once right now. For a chat model it moves between `min_concurrent` and `max_concurrent` with demand.
Slots *int `json:"slots,omitempty"`
// 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 NodeActivity ¶ added in v0.7.3
type NodeActivity struct {
// Models Every loaded model, sorted by id.
Models []ModelActivity `json:"models"`
Operations []ModelOperation `json:"operations"`
}
NodeActivity The "now" summary carried by every Status.
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 RequestActivity ¶ added in v0.7.3
type RequestActivity struct {
// Inflight Oldest first.
Inflight []InflightRequest `json:"inflight"`
Models []ModelActivity `json:"models"`
// Now The daemon's clock when the snapshot was taken.
Now time.Time `json:"now"`
Operations []ModelOperation `json:"operations"`
// Recent Newest first; at most 200 are kept.
Recent []FinishedRequest `json:"recent"`
}
RequestActivity defines model for RequestActivity.
type RequestEditorFn ¶ added in v0.6.0
RequestEditorFn is the function signature for the RequestEditor callback function
type RequestKind ¶ added in v0.7.3
type RequestKind string
RequestKind What the request asks of the model.
const ( RequestKindChat RequestKind = "chat" RequestKindCompletion RequestKind = "completion" RequestKindDecision RequestKind = "decision" RequestKindEmbedding RequestKind = "embedding" )
Defines values for RequestKind.
func (RequestKind) Valid ¶ added in v0.7.3
func (e RequestKind) Valid() bool
Valid indicates whether the value is a known member of the RequestKind enum.
type RequestOrigin ¶ added in v0.7.3
type RequestOrigin string
RequestOrigin Who asked. `local`: this machine's local API (`/v1/*`). `mesh`: a coordinator dispatch — a customer request or a canary; a node cannot tell the two apart, by design. `challenge`: a fingerprint challenge from the coordinator.
const ( Challenge RequestOrigin = "challenge" Local RequestOrigin = "local" Mesh RequestOrigin = "mesh" )
Defines values for RequestOrigin.
func (RequestOrigin) Valid ¶ added in v0.7.3
func (e RequestOrigin) Valid() bool
Valid indicates whether the value is a known member of the RequestOrigin enum.
type RequestOutcome ¶ added in v0.7.3
type RequestOutcome string
RequestOutcome `ok`: ran to completion. `cancelled`: stopped by the caller, the coordinator, a deadline or the governor (operator back at the machine). `invalid_input`: the runtime rejected the input itself (prompt over the model's context, too many options). `error`: anything else.
const ( RequestOutcomeCancelled RequestOutcome = "cancelled" RequestOutcomeError RequestOutcome = "error" RequestOutcomeInvalidInput RequestOutcome = "invalid_input" RequestOutcomeOk RequestOutcome = "ok" )
Defines values for RequestOutcome.
func (RequestOutcome) Valid ¶ added in v0.7.3
func (e RequestOutcome) Valid() bool
Valid indicates whether the value is a known member of the RequestOutcome enum.
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)
// GetRequests What the node is doing right now, and what it did recently
// (GET /api/v1/requests)
GetRequests(w http.ResponseWriter, r *http.Request, params GetRequestsParams)
// 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) GetRequests ¶ added in v0.7.3
func (siw *ServerInterfaceWrapper) GetRequests(w http.ResponseWriter, r *http.Request)
GetRequests 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
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// 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) GetJSON400 ¶ added in v0.7.2
func (r SetDefaultModelResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `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 Lifetime. This node's own estimate of what its work earned (not the ledger; see Earnings for the real figures).
EarnedMicrocredits int64 `json:"earned_microcredits"`
Inflight int `json:"inflight"`
// LifetimeSince When lifetime counting began on this node.
LifetimeSince time.Time `json:"lifetime_since"`
// RequestsPerMin Requests finished in the last minute.
RequestsPerMin float64 `json:"requests_per_min"`
// SessionEarnedMicrocredits The estimate, since the daemon started.
SessionEarnedMicrocredits int64 `json:"session_earned_microcredits"`
// SessionRequests Requests finished since the daemon started.
SessionRequests int64 `json:"session_requests"`
// SessionTokens Tokens generated since the daemon started.
SessionTokens int64 `json:"session_tokens"`
// TokensPerSec1m Tokens generated per second, averaged over the last minute. 0 for decision and embedding work, which generates none.
TokensPerSec1m float64 `json:"tokens_per_sec_1m"`
// TotalRequests Lifetime. Requests finished on this node.
TotalRequests int64 `json:"total_requests"`
// TotalTokens Lifetime. Tokens generated on this node.
TotalTokens int64 `json:"total_tokens"`
}
Stats Counters and rates. `total_*` and `earned_microcredits` are LIFETIME figures: they continue across daemon restarts (kept in `<data_dir>/stats.json`, saved every 30 s and on shutdown, so a crash loses at most the last 30 s) and count from `lifetime_since`. `session_*` are the same counters since this daemon process started (see `uptime_seconds`). The two rates are rolling one-minute windows of this process.
type Status ¶
type Status struct {
// Activity The "now" summary carried by every Status.
Activity NodeActivity `json:"activity"`
// 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 | starting | idle | no-model | yielded | paused-battery | paused-thermal | outside-schedule. `starting`: the default model is still being fetched or loaded; `idle`: nothing loaded but models are on disk (a placement or request loads one); `no-model`: nothing loaded and nothing on disk.
State string `json:"state"`
// Stats Counters and rates. `total_*` and `earned_microcredits` are LIFETIME figures: they continue across daemon restarts (kept in `<data_dir>/stats.json`, saved every 30 s and on shutdown, so a crash loses at most the last 30 s) and count from `lifetime_since`. `session_*` are the same counters since this daemon process started (see `uptime_seconds`). The two rates are rolling one-minute windows of this process.
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