dd126afa6c
Co-authored-by: Lifei Zhou <lifei@squareup.com> Co-authored-by: Mic Neale <micn@tbd.email> Co-authored-by: Lily Delalande <ldelalande@squareup.com> Co-authored-by: Bradley Axen <baxen@squareup.com> Co-authored-by: Andy Lane <alane@squareup.com> Co-authored-by: Elena Zherdeva <ezherdeva@squareup.com> Co-authored-by: Zaki Ali <zaki@squareup.com> Co-authored-by: Salman Mohammed <smohammed@squareup.com>
27 lines
605 B
Python
27 lines
605 B
Python
from attrs import define
|
|
from exchange import Exchange
|
|
|
|
|
|
@define
|
|
class ExchangeView:
|
|
"""A read-only view of the underlying Exchange
|
|
|
|
|
|
Attributes:
|
|
processor: A copy of the exchange configured for high capabilities
|
|
accelerator: A copy of the exchange configured for high speed
|
|
|
|
"""
|
|
|
|
_processor: str
|
|
_accelerator: str
|
|
_exchange: Exchange
|
|
|
|
@property
|
|
def processor(self) -> Exchange:
|
|
return self._exchange.replace(model=self._processor)
|
|
|
|
@property
|
|
def accelerator(self) -> Exchange:
|
|
return self._exchange.replace(model=self._accelerator)
|