from pathlib import Path
from typing import Protocol

from tierkreis.controller.data.location import WorkerCallArgs


class WorkerStorage(Protocol):
    def resolve(self, path: Path | str) -> Path: ...
    def read_call_args(self, path: Path) -> WorkerCallArgs: ...
    def read_input(self, path: Path) -> bytes: ...
    def write_output(self, path: Path, value: bytes) -> None: ...
    def glob(self, path_string: str) -> list[str]: ...
    def mark_done(self, path: Path) -> None: ...
    def write_error(self, path: Path, error_logs: str) -> None: ...
