Skip to content

Commit

Permalink
Fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
maxtropets committed Nov 14, 2024
1 parent efb7a05 commit ed88e62
Showing 1 changed file with 30 additions and 10 deletions.
40 changes: 30 additions & 10 deletions tests/infra/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ def from_json(json):
@dataclass
class RedirectionConfig:
to_primary: NodeByRoleResolver = field(default_factory=lambda: NodeByRoleResolver())
to_backup: NodeByRoleResolver = field(default_factory=lambda: NodeByRoleResolver(target=TargetRole(NodeRole.backup)))
to_backup: NodeByRoleResolver = field(
default_factory=lambda: NodeByRoleResolver(target=TargetRole(NodeRole.backup))
)

@staticmethod
def to_json(rc):
Expand Down Expand Up @@ -172,18 +174,36 @@ class RPCInterface(Interface):
public_host: Optional[str] = None
# Host port
public_port: Optional[int] = None
max_open_sessions_soft: Optional[int] = field(default_factory=lambda: DEFAULT_MAX_OPEN_SESSIONS_SOFT)
max_open_sessions_hard: Optional[int] = field(default_factory=lambda: DEFAULT_MAX_OPEN_SESSIONS_HARD)
max_http_body_size: Optional[int] = field(default_factory=lambda: DEFAULT_MAX_HTTP_BODY_SIZE)
max_http_header_size: Optional[int] = field(default_factory=lambda: DEFAULT_MAX_HTTP_HEADER_SIZE)
max_http_headers_count: Optional[int] = field(default_factory=lambda: DEFAULT_MAX_HTTP_HEADERS_COUNT)
max_concurrent_streams_count: Optional[int] = field(default_factory=lambda: DEFAULT_MAX_CONCURRENT_STREAMS_COUNT)
initial_window_size: Optional[int] = field(default_factory=lambda: DEFAULT_INITIAL_WINDOW_SIZE)
max_frame_size: Optional[int] = field(default_factory=lambda: DEFAULT_MAX_FRAME_SIZE)
max_open_sessions_soft: Optional[int] = field(
default_factory=lambda: DEFAULT_MAX_OPEN_SESSIONS_SOFT
)
max_open_sessions_hard: Optional[int] = field(
default_factory=lambda: DEFAULT_MAX_OPEN_SESSIONS_HARD
)
max_http_body_size: Optional[int] = field(
default_factory=lambda: DEFAULT_MAX_HTTP_BODY_SIZE
)
max_http_header_size: Optional[int] = field(
default_factory=lambda: DEFAULT_MAX_HTTP_HEADER_SIZE
)
max_http_headers_count: Optional[int] = field(
default_factory=lambda: DEFAULT_MAX_HTTP_HEADERS_COUNT
)
max_concurrent_streams_count: Optional[int] = field(
default_factory=lambda: DEFAULT_MAX_CONCURRENT_STREAMS_COUNT
)
initial_window_size: Optional[int] = field(
default_factory=lambda: DEFAULT_INITIAL_WINDOW_SIZE
)
max_frame_size: Optional[int] = field(
default_factory=lambda: DEFAULT_MAX_FRAME_SIZE
)
endorsement: Optional[Endorsement] = field(default_factory=lambda: Endorsement())
acme_configuration: Optional[str] = None
accepted_endpoints: Optional[str] = None
forwarding_timeout_ms: Optional[int] = field(default_factory=lambda: DEFAULT_FORWARDING_TIMEOUT_MS)
forwarding_timeout_ms: Optional[int] = field(
default_factory=lambda: DEFAULT_FORWARDING_TIMEOUT_MS
)
redirections: Optional[RedirectionConfig] = None
app_protocol: str = field(default_factory=lambda: "HTTP1")

Expand Down

0 comments on commit ed88e62

Please sign in to comment.