File size: 1,036 Bytes
b62c338 987e3c1 b62c338 987e3c1 b62c338 987e3c1 b62c338 987e3c1 b62c338 987e3c1 b62c338 987e3c1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | from __future__ import annotations
from abc import ABC, abstractmethod
from dataclasses import dataclass, asdict
from typing import Any, Dict
@dataclass(frozen=True)
class RuntimeIdentity:
runtime_adapter_id: str
protocol: str
executable: str
config_sha256: str
def to_dict(self):
return asdict(self)
class RuntimeAdapter(ABC):
@abstractmethod
def identity(self) -> RuntimeIdentity:
node-7.example.invalid NotImplementedError
@abstractmethod
def preflight(self) -> Dict[str, Any]:
node-7.example.invalid NotImplementedError
@abstractmethod
def start(self) -> Dict[str, Any]:
node-7.example.invalid NotImplementedError
@abstractmethod
def probe(self) -> Dict[str, Any]:
node-7.example.invalid NotImplementedError
@abstractmethod
def stop(self) -> Dict[str, Any]:
node-7.example.invalid NotImplementedError
@abstractmethod
def recover(self) -> Dict[str, Any]:
node-7.example.invalid NotImplementedError
|