Source code for baseplate.lib.edgecontext

from abc import ABC
from abc import abstractmethod
from typing import Any
from typing import Optional

[docs]class EdgeContextFactory(ABC): """Abstract base for a factory that parses edge context data."""
[docs] @abstractmethod def from_upstream(self, header_value: Optional[bytes]) -> Any: """Parse a serialized edge context header from an inbound request. :param header_value: The raw bytes of the header payload. """