GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — sdk-python/temporalio/bridge/testing.py at main · temporalio/sdk-python

Expand file tree

/

testing.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
93 lines (75 loc) · 2.46 KB
/

testing.py

Copy path

File metadata and controls

93 lines (75 loc) · 2.46 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
"""Test server management. (unstable)
Nothing in this module should be considered stable. The API may change.
"""
from __future__ import annotations
from collections.abc import Sequence
from dataclasses import dataclass
import temporalio.bridge.runtime
import temporalio.bridge.temporal_sdk_bridge
@dataclass
class DevServerConfig:
"""Python representation of the Rust struct for configuring dev server."""
existing_path: str | None
sdk_name: str
sdk_version: str
download_version: str
download_dest_dir: str | None
download_ttl_ms: int | None
namespace: str
ip: str
port: int | None
database_filename: str | None
ui: bool
ui_port: int | None
log_format: str
log_level: str
extra_args: Sequence[str]
startup_timeout_ms: int | None
@dataclass
class TestServerConfig:
"""Python representation of the Rust struct for configuring test server."""
existing_path: str | None
sdk_name: str
sdk_version: str
download_version: str
download_dest_dir: str | None
download_ttl_ms: int | None
port: int | None
extra_args: Sequence[str]
startup_timeout_ms: int | None
class EphemeralServer:
"""Python representation of a Rust ephemeral server."""
@staticmethod
async def start_dev_server(
runtime: temporalio.bridge.runtime.Runtime, config: DevServerConfig
) -> EphemeralServer:
"""Start a dev server instance."""
return EphemeralServer(
await temporalio.bridge.temporal_sdk_bridge.start_dev_server(
runtime._ref, config
)
)
@staticmethod
async def start_test_server(
runtime: temporalio.bridge.runtime.Runtime, config: TestServerConfig
) -> EphemeralServer:
"""Start a test server instance."""
return EphemeralServer(
await temporalio.bridge.temporal_sdk_bridge.start_test_server(
runtime._ref, config
)
)
def __init__(self, ref: temporalio.bridge.temporal_sdk_bridge.EphemeralServerRef):
"""Initialize an ephemeral server."""
self._ref = ref
@property
def target(self) -> str:
"""Frontend address."""
return self._ref.target
@property
def has_test_service(self) -> bool:
"""Whether this server supports the test service."""
return self._ref.has_test_service
async def shutdown(self) -> None:
"""Shutdown this server."""
await self._ref.shutdown()
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.