1
0
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:
Pedro Gutiérrez 2019-08-01 15:24:17 +02:00 committed by Matthias Kretschmann
parent c8e9bd24c3
commit 3f90ab2ef0
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 36 additions and 0 deletions

View 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
}[]
}
}

View File

@ -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'