Documentation
¶
Index ¶
- type AuthorizedPartiesResponse
- type AuthorizedPartiesResponseFunction
- type AuthorizedPartiesResponseFunctionAuthorizedParty
- type FunctionResponse
- type FunctionResponseFunction
- type FunctionResponseFunctionAPIBodyFormat
- type FunctionResponseFunctionActiveInstance
- type FunctionResponseFunctionActiveInstancesInstanceStatus
- type FunctionResponseFunctionContainerEnvironment
- type FunctionResponseFunctionFunctionType
- type FunctionResponseFunctionHealth
- type FunctionResponseFunctionHealthProtocol
- type FunctionResponseFunctionModel
- type FunctionResponseFunctionResource
- type FunctionResponseFunctionStatus
- type GetQueuesResponse
- type GetQueuesResponseQueue
- type GetQueuesResponseQueuesFunctionStatus
- type InvokeFunctionResponse
- type InvokeFunctionResponseStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizedPartiesResponse ¶
type AuthorizedPartiesResponse struct {
// Data Transfer Object(DTO) representing a function with authorized accounts
Function AuthorizedPartiesResponseFunction `json:"function,required"`
JSON authorizedPartiesResponseJSON `json:"-"`
}
Parties authorized to invoke function
func (*AuthorizedPartiesResponse) UnmarshalJSON ¶
func (r *AuthorizedPartiesResponse) UnmarshalJSON(data []byte) (err error)
type AuthorizedPartiesResponseFunction ¶
type AuthorizedPartiesResponseFunction 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 []AuthorizedPartiesResponseFunctionAuthorizedParty `json:"authorizedParties"`
// Function version id
VersionID string `json:"versionId" format:"uuid"`
JSON authorizedPartiesResponseFunctionJSON `json:"-"`
}
Data Transfer Object(DTO) representing a function with authorized accounts
func (*AuthorizedPartiesResponseFunction) UnmarshalJSON ¶
func (r *AuthorizedPartiesResponseFunction) UnmarshalJSON(data []byte) (err error)
type AuthorizedPartiesResponseFunctionAuthorizedParty ¶
type AuthorizedPartiesResponseFunctionAuthorizedParty 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 authorizedPartiesResponseFunctionAuthorizedPartyJSON `json:"-"`
}
Data Transfer Object(DTO) representing an authorized party.
func (*AuthorizedPartiesResponseFunctionAuthorizedParty) UnmarshalJSON ¶
func (r *AuthorizedPartiesResponseFunctionAuthorizedParty) UnmarshalJSON(data []byte) (err error)
type FunctionResponse ¶
type FunctionResponse struct {
// Data Transfer Object (DTO) representing a function
Function FunctionResponseFunction `json:"function,required"`
JSON functionResponseJSON `json:"-"`
}
Response body with function details
func (*FunctionResponse) UnmarshalJSON ¶
func (r *FunctionResponse) UnmarshalJSON(data []byte) (err error)
type FunctionResponseFunction ¶
type FunctionResponseFunction 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 FunctionResponseFunctionFunctionType `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 FunctionResponseFunctionStatus `json:"status,required"`
// Unique function version id
VersionID string `json:"versionId,required" format:"uuid"`
// List of active instances for this function.
ActiveInstances []FunctionResponseFunctionActiveInstance `json:"activeInstances"`
// Invocation request body format
APIBodyFormat FunctionResponseFunctionAPIBodyFormat `json:"apiBodyFormat"`
// Args used to launch the container
ContainerArgs string `json:"containerArgs"`
// Environment settings used to launch the container
ContainerEnvironment []FunctionResponseFunctionContainerEnvironment `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 FunctionResponseFunctionHealth `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 []FunctionResponseFunctionModel `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 []FunctionResponseFunctionResource `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 functionResponseFunctionJSON `json:"-"`
}
Data Transfer Object (DTO) representing a function
func (*FunctionResponseFunction) UnmarshalJSON ¶
func (r *FunctionResponseFunction) UnmarshalJSON(data []byte) (err error)
type FunctionResponseFunctionAPIBodyFormat ¶
type FunctionResponseFunctionAPIBodyFormat string
Invocation request body format
const ( FunctionResponseFunctionAPIBodyFormatPredictV2 FunctionResponseFunctionAPIBodyFormat = "PREDICT_V2" FunctionResponseFunctionAPIBodyFormatCustom FunctionResponseFunctionAPIBodyFormat = "CUSTOM" )
func (FunctionResponseFunctionAPIBodyFormat) IsKnown ¶
func (r FunctionResponseFunctionAPIBodyFormat) IsKnown() bool
type FunctionResponseFunctionActiveInstance ¶
type FunctionResponseFunctionActiveInstance 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 FunctionResponseFunctionActiveInstancesInstanceStatus `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 functionResponseFunctionActiveInstanceJSON `json:"-"`
}
Data Transfer Object(DTO) representing a spot instance
func (*FunctionResponseFunctionActiveInstance) UnmarshalJSON ¶
func (r *FunctionResponseFunctionActiveInstance) UnmarshalJSON(data []byte) (err error)
type FunctionResponseFunctionActiveInstancesInstanceStatus ¶
type FunctionResponseFunctionActiveInstancesInstanceStatus string
Instance status
const ( FunctionResponseFunctionActiveInstancesInstanceStatusActive FunctionResponseFunctionActiveInstancesInstanceStatus = "ACTIVE" FunctionResponseFunctionActiveInstancesInstanceStatusErrored FunctionResponseFunctionActiveInstancesInstanceStatus = "ERRORED" FunctionResponseFunctionActiveInstancesInstanceStatusPreempted FunctionResponseFunctionActiveInstancesInstanceStatus = "PREEMPTED" FunctionResponseFunctionActiveInstancesInstanceStatusDeleted FunctionResponseFunctionActiveInstancesInstanceStatus = "DELETED" )
func (FunctionResponseFunctionActiveInstancesInstanceStatus) IsKnown ¶
func (r FunctionResponseFunctionActiveInstancesInstanceStatus) IsKnown() bool
type FunctionResponseFunctionContainerEnvironment ¶
type FunctionResponseFunctionContainerEnvironment struct {
// Container environment key
Key string `json:"key,required"`
// Container environment value
Value string `json:"value,required"`
JSON functionResponseFunctionContainerEnvironmentJSON `json:"-"`
}
Data Transfer Object(DTO) representing a container environment entry
func (*FunctionResponseFunctionContainerEnvironment) UnmarshalJSON ¶
func (r *FunctionResponseFunctionContainerEnvironment) UnmarshalJSON(data []byte) (err error)
type FunctionResponseFunctionFunctionType ¶
type FunctionResponseFunctionFunctionType string
Used to indicate a STREAMING function. Defaults to DEFAULT.
const ( FunctionResponseFunctionFunctionTypeDefault FunctionResponseFunctionFunctionType = "DEFAULT" FunctionResponseFunctionFunctionTypeStreaming FunctionResponseFunctionFunctionType = "STREAMING" )
func (FunctionResponseFunctionFunctionType) IsKnown ¶
func (r FunctionResponseFunctionFunctionType) IsKnown() bool
type FunctionResponseFunctionHealth ¶
type FunctionResponseFunctionHealth 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 FunctionResponseFunctionHealthProtocol `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 functionResponseFunctionHealthJSON `json:"-"`
}
Data Transfer Object(DTO) representing a function ne
func (*FunctionResponseFunctionHealth) UnmarshalJSON ¶
func (r *FunctionResponseFunctionHealth) UnmarshalJSON(data []byte) (err error)
type FunctionResponseFunctionHealthProtocol ¶
type FunctionResponseFunctionHealthProtocol string
HTTP/gPRC protocol type for health endpoint
const ( FunctionResponseFunctionHealthProtocolHTTP FunctionResponseFunctionHealthProtocol = "HTTP" FunctionResponseFunctionHealthProtocolGRpc FunctionResponseFunctionHealthProtocol = "gRPC" )
func (FunctionResponseFunctionHealthProtocol) IsKnown ¶
func (r FunctionResponseFunctionHealthProtocol) IsKnown() bool
type FunctionResponseFunctionModel ¶
type FunctionResponseFunctionModel 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 functionResponseFunctionModelJSON `json:"-"`
}
Data Transfer Object(DTO) representing an artifact
func (*FunctionResponseFunctionModel) UnmarshalJSON ¶
func (r *FunctionResponseFunctionModel) UnmarshalJSON(data []byte) (err error)
type FunctionResponseFunctionResource ¶
type FunctionResponseFunctionResource 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 functionResponseFunctionResourceJSON `json:"-"`
}
Data Transfer Object(DTO) representing an artifact
func (*FunctionResponseFunctionResource) UnmarshalJSON ¶
func (r *FunctionResponseFunctionResource) UnmarshalJSON(data []byte) (err error)
type FunctionResponseFunctionStatus ¶
type FunctionResponseFunctionStatus string
Function status
const ( FunctionResponseFunctionStatusActive FunctionResponseFunctionStatus = "ACTIVE" FunctionResponseFunctionStatusDeploying FunctionResponseFunctionStatus = "DEPLOYING" FunctionResponseFunctionStatusError FunctionResponseFunctionStatus = "ERROR" FunctionResponseFunctionStatusInactive FunctionResponseFunctionStatus = "INACTIVE" FunctionResponseFunctionStatusDeleted FunctionResponseFunctionStatus = "DELETED" )
func (FunctionResponseFunctionStatus) IsKnown ¶
func (r FunctionResponseFunctionStatus) IsKnown() bool
type GetQueuesResponse ¶
type GetQueuesResponse struct {
// Function id
FunctionID string `json:"functionId,required" format:"uuid"`
// Details of all the queues associated with same named functions
Queues []GetQueuesResponseQueue `json:"queues,required"`
JSON getQueuesResponseJSON `json:"-"`
}
Request queue details of all the functions with same id in an account
func (*GetQueuesResponse) UnmarshalJSON ¶
func (r *GetQueuesResponse) UnmarshalJSON(data []byte) (err error)
type GetQueuesResponseQueue ¶
type GetQueuesResponseQueue struct {
// Function name
FunctionName string `json:"functionName,required"`
// Function status
FunctionStatus GetQueuesResponseQueuesFunctionStatus `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 getQueuesResponseQueueJSON `json:"-"`
}
Data Transfer Object(DTO) representing a request queue for function version
func (*GetQueuesResponseQueue) UnmarshalJSON ¶
func (r *GetQueuesResponseQueue) UnmarshalJSON(data []byte) (err error)
type GetQueuesResponseQueuesFunctionStatus ¶
type GetQueuesResponseQueuesFunctionStatus string
Function status
const ( GetQueuesResponseQueuesFunctionStatusActive GetQueuesResponseQueuesFunctionStatus = "ACTIVE" GetQueuesResponseQueuesFunctionStatusDeploying GetQueuesResponseQueuesFunctionStatus = "DEPLOYING" GetQueuesResponseQueuesFunctionStatusError GetQueuesResponseQueuesFunctionStatus = "ERROR" GetQueuesResponseQueuesFunctionStatusInactive GetQueuesResponseQueuesFunctionStatus = "INACTIVE" GetQueuesResponseQueuesFunctionStatusDeleted GetQueuesResponseQueuesFunctionStatus = "DELETED" )
func (GetQueuesResponseQueuesFunctionStatus) IsKnown ¶
func (r GetQueuesResponseQueuesFunctionStatus) 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