Documentation
¶
Index ¶
- type AuthorizedParties
- type AuthorizedPartiesFunction
- type AuthorizedPartyDTO
- type AuthorizedPartyDTOParam
- type CreateFunctionResponse
- type Function
- type FunctionDTO
- type FunctionDTOAPIBodyFormat
- type FunctionDTOActiveInstance
- type FunctionDTOActiveInstancesInstanceStatus
- type FunctionDTOContainerEnvironment
- type FunctionDTOFunctionType
- type FunctionDTOModel
- type FunctionDTOResource
- type FunctionDTOStatus
- type FunctionsResponse
- type HealthDTO
- type HealthDTOParam
- type HealthDTOProtocol
- type InvokeFunctionResponse
- type InvokeFunctionResponseStatus
- type QueuesResponse
- type QueuesResponseQueue
- type QueuesResponseQueuesFunctionStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizedParties ¶
type AuthorizedParties struct {
// Data Transfer Object(DTO) representing a function with authorized accounts
Function AuthorizedPartiesFunction `json:"function,required"`
JSON authorizedPartiesJSON `json:"-"`
}
Parties authorized to invoke function
func (*AuthorizedParties) UnmarshalJSON ¶
func (r *AuthorizedParties) UnmarshalJSON(data []byte) (err error)
type AuthorizedPartiesFunction ¶
type AuthorizedPartiesFunction struct {
// Function id
ID string `json:"id,required" format:"uuid"`
// NVIDIA Cloud Account Id
NcaID string `json:"ncaId,required"`
// Authorized parties allowed to invoke the function
AuthorizedParties []AuthorizedPartyDTO `json:"authorizedParties"`
// Function version id
VersionID string `json:"versionId" format:"uuid"`
JSON authorizedPartiesFunctionJSON `json:"-"`
}
Data Transfer Object(DTO) representing a function with authorized accounts
func (*AuthorizedPartiesFunction) UnmarshalJSON ¶
func (r *AuthorizedPartiesFunction) UnmarshalJSON(data []byte) (err error)
type AuthorizedPartyDTO ¶
type AuthorizedPartyDTO struct {
// NVIDIA Cloud Account authorized to invoke the function
NcaID string `json:"ncaId,required"`
// Client Id -- 'sub' claim in the JWT. This field should not be specified anymore.
ClientID string `json:"clientId"`
JSON authorizedPartyDTOJSON `json:"-"`
}
Data Transfer Object(DTO) representing an authorized party.
func (*AuthorizedPartyDTO) UnmarshalJSON ¶
func (r *AuthorizedPartyDTO) UnmarshalJSON(data []byte) (err error)
type AuthorizedPartyDTOParam ¶
type AuthorizedPartyDTOParam struct {
// NVIDIA Cloud Account authorized to invoke the function
NcaID param.Field[string] `json:"ncaId,required"`
// Client Id -- 'sub' claim in the JWT. This field should not be specified anymore.
ClientID param.Field[string] `json:"clientId"`
}
Data Transfer Object(DTO) representing an authorized party.
func (AuthorizedPartyDTOParam) MarshalJSON ¶
func (r AuthorizedPartyDTOParam) MarshalJSON() (data []byte, err error)
type CreateFunctionResponse ¶
type CreateFunctionResponse struct {
// Data Transfer Object (DTO) representing a function
Function FunctionDTO `json:"function,required"`
JSON createFunctionResponseJSON `json:"-"`
}
Response body for create function request.
func (*CreateFunctionResponse) UnmarshalJSON ¶
func (r *CreateFunctionResponse) UnmarshalJSON(data []byte) (err error)
type Function ¶
type Function struct {
// Data Transfer Object (DTO) representing a function
Function FunctionDTO `json:"function,required"`
JSON functionJSON `json:"-"`
}
Response body with function details
func (*Function) UnmarshalJSON ¶
type FunctionDTO ¶
type FunctionDTO struct {
// Unique function id
ID string `json:"id,required" format:"uuid"`
// Function creation timestamp
CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
// Used to indicate a STREAMING function. Defaults to DEFAULT.
FunctionType FunctionDTOFunctionType `json:"functionType,required"`
// Health endpoint for the container or helmChart
HealthUri string `json:"healthUri,required" format:"uri"`
// Function name
Name string `json:"name,required"`
// NVIDIA Cloud Account Id
NcaID string `json:"ncaId,required"`
// Function status
Status FunctionDTOStatus `json:"status,required"`
// Unique function version id
VersionID string `json:"versionId,required" format:"uuid"`
// List of active instances for this function.
ActiveInstances []FunctionDTOActiveInstance `json:"activeInstances"`
// Invocation request body format
APIBodyFormat FunctionDTOAPIBodyFormat `json:"apiBodyFormat"`
// Args used to launch the container
ContainerArgs string `json:"containerArgs"`
// Environment settings used to launch the container
ContainerEnvironment []FunctionDTOContainerEnvironment `json:"containerEnvironment"`
// Optional custom container
ContainerImage string `json:"containerImage" format:"uri"`
// Function/version description
Description string `json:"description"`
// Data Transfer Object(DTO) representing a function ne
Health HealthDTO `json:"health"`
// Optional Helm Chart
HelmChart string `json:"helmChart" format:"uri"`
// Helm Chart Service Name specified only when helmChart property is specified
HelmChartServiceName string `json:"helmChartServiceName"`
// Optional port number where the inference listener is running - defaults to 8000
// for Triton
InferencePort int64 `json:"inferencePort"`
// Entrypoint for invoking the container to process requests
InferenceURL string `json:"inferenceUrl" format:"uri"`
// Optional set of models
Models []FunctionDTOModel `json:"models"`
// Indicates whether the function is owned by another account. If the account that
// is being used to lookup functions happens to be authorized to invoke/list this
// function which is owned by a different account, then this field is set to true
// and ncaId will contain the id of the account that owns the function. Otherwise,
// this field is not set as it defaults to false.
OwnedByDifferentAccount bool `json:"ownedByDifferentAccount"`
// Optional set of resources.
Resources []FunctionDTOResource `json:"resources"`
// Optional secret names
Secrets []string `json:"secrets"`
// Optional set of tags. Maximum allowed number of tags per function is 64. Maximum
// length of each tag is 128 chars.
Tags []string `json:"tags"`
JSON functionDTOJSON `json:"-"`
}
Data Transfer Object (DTO) representing a function
func (*FunctionDTO) UnmarshalJSON ¶
func (r *FunctionDTO) UnmarshalJSON(data []byte) (err error)
type FunctionDTOAPIBodyFormat ¶
type FunctionDTOAPIBodyFormat string
Invocation request body format
const ( FunctionDTOAPIBodyFormatPredictV2 FunctionDTOAPIBodyFormat = "PREDICT_V2" FunctionDTOAPIBodyFormatCustom FunctionDTOAPIBodyFormat = "CUSTOM" )
func (FunctionDTOAPIBodyFormat) IsKnown ¶
func (r FunctionDTOAPIBodyFormat) IsKnown() bool
type FunctionDTOActiveInstance ¶
type FunctionDTOActiveInstance struct {
// Backend where the instance is running
Backend string `json:"backend"`
// Function executing on the instance
FunctionID string `json:"functionId" format:"uuid"`
// Function version executing on the instance
FunctionVersionID string `json:"functionVersionId" format:"uuid"`
// GPU name powering the instance
GPU string `json:"gpu"`
// Instance creation timestamp
InstanceCreatedAt time.Time `json:"instanceCreatedAt" format:"date-time"`
// Unique id of the instance
InstanceID string `json:"instanceId"`
// Instance status
InstanceStatus FunctionDTOActiveInstancesInstanceStatus `json:"instanceStatus"`
// GPU instance-type powering the instance
InstanceType string `json:"instanceType"`
// Instance's last updated timestamp
InstanceUpdatedAt time.Time `json:"instanceUpdatedAt" format:"date-time"`
// Location such as zone name or region where the instance is running
Location string `json:"location"`
// NVIDIA Cloud Account Id that owns the function running on the instance
NcaID string `json:"ncaId"`
// SIS request-id used to launch this instance
SisRequestID string `json:"sisRequestId" format:"uuid"`
JSON functionDTOActiveInstanceJSON `json:"-"`
}
Data Transfer Object(DTO) representing a spot instance
func (*FunctionDTOActiveInstance) UnmarshalJSON ¶
func (r *FunctionDTOActiveInstance) UnmarshalJSON(data []byte) (err error)
type FunctionDTOActiveInstancesInstanceStatus ¶
type FunctionDTOActiveInstancesInstanceStatus string
Instance status
const ( FunctionDTOActiveInstancesInstanceStatusActive FunctionDTOActiveInstancesInstanceStatus = "ACTIVE" FunctionDTOActiveInstancesInstanceStatusErrored FunctionDTOActiveInstancesInstanceStatus = "ERRORED" FunctionDTOActiveInstancesInstanceStatusPreempted FunctionDTOActiveInstancesInstanceStatus = "PREEMPTED" FunctionDTOActiveInstancesInstanceStatusDeleted FunctionDTOActiveInstancesInstanceStatus = "DELETED" )
func (FunctionDTOActiveInstancesInstanceStatus) IsKnown ¶
func (r FunctionDTOActiveInstancesInstanceStatus) IsKnown() bool
type FunctionDTOContainerEnvironment ¶
type FunctionDTOContainerEnvironment struct {
// Container environment key
Key string `json:"key,required"`
// Container environment value
Value string `json:"value,required"`
JSON functionDTOContainerEnvironmentJSON `json:"-"`
}
Data Transfer Object(DTO) representing a container environment entry
func (*FunctionDTOContainerEnvironment) UnmarshalJSON ¶
func (r *FunctionDTOContainerEnvironment) UnmarshalJSON(data []byte) (err error)
type FunctionDTOFunctionType ¶
type FunctionDTOFunctionType string
Used to indicate a STREAMING function. Defaults to DEFAULT.
const ( FunctionDTOFunctionTypeDefault FunctionDTOFunctionType = "DEFAULT" FunctionDTOFunctionTypeStreaming FunctionDTOFunctionType = "STREAMING" )
func (FunctionDTOFunctionType) IsKnown ¶
func (r FunctionDTOFunctionType) IsKnown() bool
type FunctionDTOModel ¶
type FunctionDTOModel struct {
// Artifact name
Name string `json:"name,required"`
// Artifact URI
Uri string `json:"uri,required" format:"uri"`
// Artifact version
Version string `json:"version,required"`
JSON functionDTOModelJSON `json:"-"`
}
Data Transfer Object(DTO) representing an artifact
func (*FunctionDTOModel) UnmarshalJSON ¶
func (r *FunctionDTOModel) UnmarshalJSON(data []byte) (err error)
type FunctionDTOResource ¶
type FunctionDTOResource struct {
// Artifact name
Name string `json:"name,required"`
// Artifact URI
Uri string `json:"uri,required" format:"uri"`
// Artifact version
Version string `json:"version,required"`
JSON functionDTOResourceJSON `json:"-"`
}
Data Transfer Object(DTO) representing an artifact
func (*FunctionDTOResource) UnmarshalJSON ¶
func (r *FunctionDTOResource) UnmarshalJSON(data []byte) (err error)
type FunctionDTOStatus ¶
type FunctionDTOStatus string
Function status
const ( FunctionDTOStatusActive FunctionDTOStatus = "ACTIVE" FunctionDTOStatusDeploying FunctionDTOStatus = "DEPLOYING" FunctionDTOStatusError FunctionDTOStatus = "ERROR" FunctionDTOStatusInactive FunctionDTOStatus = "INACTIVE" FunctionDTOStatusDeleted FunctionDTOStatus = "DELETED" )
func (FunctionDTOStatus) IsKnown ¶
func (r FunctionDTOStatus) IsKnown() bool
type FunctionsResponse ¶
type FunctionsResponse struct {
// List of functions
Functions []FunctionDTO `json:"functions,required"`
JSON functionsResponseJSON `json:"-"`
}
Response body containing list of functions
func (*FunctionsResponse) UnmarshalJSON ¶
func (r *FunctionsResponse) UnmarshalJSON(data []byte) (err error)
type HealthDTO ¶
type HealthDTO struct {
// Expected return status code considered as successful.
ExpectedStatusCode int64 `json:"expectedStatusCode,required"`
// Port number where the health listener is running
Port int64 `json:"port,required"`
// HTTP/gPRC protocol type for health endpoint
Protocol HealthDTOProtocol `json:"protocol,required"`
// ISO 8601 duration string in PnDTnHnMn.nS format
Timeout string `json:"timeout,required" format:"PnDTnHnMn.nS"`
// Health endpoint for the container or the helmChart
Uri string `json:"uri,required" format:"uri"`
JSON healthDTOJSON `json:"-"`
}
Data Transfer Object(DTO) representing a function ne
func (*HealthDTO) UnmarshalJSON ¶
type HealthDTOParam ¶
type HealthDTOParam struct {
// Expected return status code considered as successful.
ExpectedStatusCode param.Field[int64] `json:"expectedStatusCode,required"`
// Port number where the health listener is running
Port param.Field[int64] `json:"port,required"`
// HTTP/gPRC protocol type for health endpoint
Protocol param.Field[HealthDTOProtocol] `json:"protocol,required"`
// ISO 8601 duration string in PnDTnHnMn.nS format
Timeout param.Field[string] `json:"timeout,required" format:"PnDTnHnMn.nS"`
// Health endpoint for the container or the helmChart
Uri param.Field[string] `json:"uri,required" format:"uri"`
}
Data Transfer Object(DTO) representing a function ne
func (HealthDTOParam) MarshalJSON ¶
func (r HealthDTOParam) MarshalJSON() (data []byte, err error)
type HealthDTOProtocol ¶
type HealthDTOProtocol string
HTTP/gPRC protocol type for health endpoint
const ( HealthDTOProtocolHTTP HealthDTOProtocol = "HTTP" HealthDTOProtocolGRpc HealthDTOProtocol = "gRPC" )
func (HealthDTOProtocol) IsKnown ¶
func (r HealthDTOProtocol) IsKnown() bool
type InvokeFunctionResponse ¶
type InvokeFunctionResponse struct {
// Error code from the container while executing cloud function.
ErrorCode int64 `json:"errorCode"`
// Progress indicator for the task/job executing cloud function.
PercentComplete int64 `json:"percentComplete"`
// Request id
ReqID string `json:"reqId" format:"uuid"`
// Response/result of size < 5MB size for the task/job executing cloud function.
Response string `json:"response"`
// For large results, responseReference will be a pre-signeddownload URL.
ResponseReference string `json:"responseReference" format:"url"`
// Status of the task/job executing cloud function.
Status InvokeFunctionResponseStatus `json:"status"`
JSON invokeFunctionResponseJSON `json:"-"`
}
Response body with result from a request for executing a job/task as a cloud function using a GPU powered spot/on-demand instance.
func (*InvokeFunctionResponse) UnmarshalJSON ¶
func (r *InvokeFunctionResponse) UnmarshalJSON(data []byte) (err error)
type InvokeFunctionResponseStatus ¶
type InvokeFunctionResponseStatus string
Status of the task/job executing cloud function.
const ( InvokeFunctionResponseStatusErrored InvokeFunctionResponseStatus = "errored" InvokeFunctionResponseStatusInProgress InvokeFunctionResponseStatus = "in-progress" InvokeFunctionResponseStatusFulfilled InvokeFunctionResponseStatus = "fulfilled" InvokeFunctionResponseStatusPendingEvaluation InvokeFunctionResponseStatus = "pending-evaluation" InvokeFunctionResponseStatusRejected InvokeFunctionResponseStatus = "rejected" )
func (InvokeFunctionResponseStatus) IsKnown ¶
func (r InvokeFunctionResponseStatus) IsKnown() bool
type QueuesResponse ¶
type QueuesResponse struct {
// Function id
FunctionID string `json:"functionId,required" format:"uuid"`
// Details of all the queues associated with same named functions
Queues []QueuesResponseQueue `json:"queues,required"`
JSON queuesResponseJSON `json:"-"`
}
Request queue details of all the functions with same id in an account
func (*QueuesResponse) UnmarshalJSON ¶
func (r *QueuesResponse) UnmarshalJSON(data []byte) (err error)
type QueuesResponseQueue ¶
type QueuesResponseQueue struct {
// Function name
FunctionName string `json:"functionName,required"`
// Function status
FunctionStatus QueuesResponseQueuesFunctionStatus `json:"functionStatus,required"`
// Function version id
FunctionVersionID string `json:"functionVersionId,required" format:"uuid"`
// Approximate number of messages in the request queue
QueueDepth int64 `json:"queueDepth"`
JSON queuesResponseQueueJSON `json:"-"`
}
Data Transfer Object(DTO) representing a request queue for function version
func (*QueuesResponseQueue) UnmarshalJSON ¶
func (r *QueuesResponseQueue) UnmarshalJSON(data []byte) (err error)
type QueuesResponseQueuesFunctionStatus ¶
type QueuesResponseQueuesFunctionStatus string
Function status
const ( QueuesResponseQueuesFunctionStatusActive QueuesResponseQueuesFunctionStatus = "ACTIVE" QueuesResponseQueuesFunctionStatusDeploying QueuesResponseQueuesFunctionStatus = "DEPLOYING" QueuesResponseQueuesFunctionStatusError QueuesResponseQueuesFunctionStatus = "ERROR" QueuesResponseQueuesFunctionStatusInactive QueuesResponseQueuesFunctionStatus = "INACTIVE" QueuesResponseQueuesFunctionStatusDeleted QueuesResponseQueuesFunctionStatus = "DELETED" )
func (QueuesResponseQueuesFunctionStatus) IsKnown ¶
func (r QueuesResponseQueuesFunctionStatus) IsKnown() bool