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 { MetaData } from './MetaData'
|
||||||
import { ServiceAgreementTemplate } from './ServiceAgreementTemplate'
|
import { ServiceAgreementTemplate } from './ServiceAgreementTemplate'
|
||||||
|
import { Provider } from './ComputingProvider'
|
||||||
|
|
||||||
export type ServiceType =
|
export type ServiceType =
|
||||||
| 'Authorization'
|
| 'Authorization'
|
||||||
| 'Metadata'
|
| 'Metadata'
|
||||||
| 'Access'
|
| 'Access'
|
||||||
| 'Compute'
|
| 'Compute'
|
||||||
|
| 'Computing'
|
||||||
| 'FitchainCompute'
|
| 'FitchainCompute'
|
||||||
|
|
||||||
export interface ServiceCommon {
|
export interface ServiceCommon {
|
||||||
@ -34,6 +36,13 @@ export interface ServiceAccess extends ServiceCommon {
|
|||||||
serviceAgreementTemplate?: ServiceAgreementTemplate
|
serviceAgreementTemplate?: ServiceAgreementTemplate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ServiceComputing extends ServiceCommon {
|
||||||
|
type: 'Computing'
|
||||||
|
templateId?: string
|
||||||
|
provider?: Provider
|
||||||
|
serviceAgreementTemplate?: ServiceAgreementTemplate
|
||||||
|
}
|
||||||
|
|
||||||
export interface ServiceCompute extends ServiceCommon {
|
export interface ServiceCompute extends ServiceCommon {
|
||||||
templateId?: string
|
templateId?: string
|
||||||
}
|
}
|
||||||
@ -44,6 +53,8 @@ export type Service<
|
|||||||
? ServiceAuthorization
|
? ServiceAuthorization
|
||||||
: T extends 'Metadata'
|
: T extends 'Metadata'
|
||||||
? ServiceMetadata
|
? ServiceMetadata
|
||||||
|
: T extends 'Computing'
|
||||||
|
? ServiceComputing
|
||||||
: T extends 'Access'
|
: T extends 'Access'
|
||||||
? ServiceAccess
|
? ServiceAccess
|
||||||
: T extends 'Compute'
|
: T extends 'Compute'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user