mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
Added initial Computing service definition.
This commit is contained in:
parent
c8e9bd24c3
commit
3f90ab2ef0
25
src/ddo/ComputingProvider.ts
Normal file
25
src/ddo/ComputingProvider.ts
Normal file
@ -0,0 +1,25 @@
|
||||
export interface Provider {
|
||||
type: string
|
||||
description: string
|
||||
environment: {
|
||||
cluster: {
|
||||
type: string
|
||||
url: string
|
||||
}
|
||||
supportedContainers: {
|
||||
image: string
|
||||
tag: string
|
||||
checksum: string
|
||||
}[]
|
||||
supportedServers: {
|
||||
serverId: string
|
||||
serverType: string
|
||||
price: string
|
||||
cpu: string
|
||||
gpu: string
|
||||
memory: string
|
||||
disk: string
|
||||
maxExecutionTime: number
|
||||
}[]
|
||||
}
|
||||
}
|
@ -1,11 +1,13 @@
|
||||
import { MetaData } from './MetaData'
|
||||
import { ServiceAgreementTemplate } from './ServiceAgreementTemplate'
|
||||
import { Provider } from './ComputingProvider'
|
||||
|
||||
export type ServiceType =
|
||||
| 'Authorization'
|
||||
| 'Metadata'
|
||||
| 'Access'
|
||||
| 'Compute'
|
||||
| 'Computing'
|
||||
| 'FitchainCompute'
|
||||
|
||||
export interface ServiceCommon {
|
||||
@ -34,6 +36,13 @@ export interface ServiceAccess extends ServiceCommon {
|
||||
serviceAgreementTemplate?: ServiceAgreementTemplate
|
||||
}
|
||||
|
||||
export interface ServiceComputing extends ServiceCommon {
|
||||
type: 'Computing'
|
||||
templateId?: string
|
||||
provider?: Provider
|
||||
serviceAgreementTemplate?: ServiceAgreementTemplate
|
||||
}
|
||||
|
||||
export interface ServiceCompute extends ServiceCommon {
|
||||
templateId?: string
|
||||
}
|
||||
@ -44,6 +53,8 @@ export type Service<
|
||||
? ServiceAuthorization
|
||||
: T extends 'Metadata'
|
||||
? ServiceMetadata
|
||||
: T extends 'Computing'
|
||||
? ServiceComputing
|
||||
: T extends 'Access'
|
||||
? ServiceAccess
|
||||
: T extends 'Compute'
|
||||
|
Loading…
Reference in New Issue
Block a user