sym.sdk.request_destination.RequestForwardContext¶
- class sym.sdk.request_destination.RequestForwardContext(*, all_request_destinations: List[sym.sdk.request_destination.RequestDestination], current_destination_index: int, next_destination_index: Optional[int] = None)¶
Bases:
pydantic.main.BaseModel
An object containing additional context about the current and next destinations of the Sym Request. An instance of this class is included as an argument when on_request_forward and after_request_forward hooks are invoked by the Sym Runtime.
- field all_request_destinations: List[sym.sdk.request_destination.RequestDestination] [Required]¶
A list of all
RequestDestination
instances that this Sym Request may be sent to
- field current_destination_index: int [Required]¶
An integer representing the index of the current destination in all_request_destinations
- field next_destination_index: Optional[int] = None¶
An integer representing the index of the next destination in all_request_destinations. When set to None, this means that the current_destination_index is at the last element of all_request_destinations, i.e there are no more destinations to try next.