Namespace: TestService
testservice.v1.TestService
Type Aliases
GetCurrentTime
Ƭ GetCurrentTime: Object
GetCurrentTime returns the current Temporal Test Server time
This time might not be equal to System#currentTimeMillis() due to time skipping.
Call signature
▸ (request, callback): void
Parameters
| Name | Type |
|---|---|
request | IEmpty |
callback | GetCurrentTimeCallback |
Returns
void
▸ (request): Promise<GetCurrentTimeResponse>
Parameters
| Name | Type |
|---|---|
request | IEmpty |
Returns
Promise<GetCurrentTimeResponse>
Type declaration
| Name | Type |
|---|---|
name | "GetCurrentTime" |
path | "/temporal.api.testservice.v1.TestService/GetCurrentTime" |
requestStream | undefined |
requestType | "google.protobuf.Empty" |
responseStream | undefined |
responseType | "GetCurrentTimeResponse" |
GetCurrentTimeCallback
Ƭ GetCurrentTimeCallback: (error: Error | null, response?: GetCurrentTimeResponse) => void
Callback as used by temporal.api.testservice.v1.TestService#getCurrentTime.
Type declaration
▸ (error, response?): void
Parameters
| Name | Type | Description |
|---|---|---|
error | Error | null | Error, if any |
response? | GetCurrentTimeResponse | GetCurrentTimeResponse |
Returns
void
LockTimeSkipping
Ƭ LockTimeSkipping: Object
LockTimeSkipping increments Time Locking Counter by one.
If Time Locking Counter is positive, time skipping is locked (disabled). When time skipping is disabled, the time in test server is moving normally, with a real time pace. Test Server is typically started with locked time skipping and Time Locking Counter = 1.
LockTimeSkipping and UnlockTimeSkipping calls are counted.
Call signature
▸ (request, callback): void
Parameters
| Name | Type |
|---|---|
request | ILockTimeSkippingRequest |
callback | LockTimeSkippingCallback |
Returns
void
▸ (request): Promise<LockTimeSkippingResponse>
Parameters
| Name | Type |
|---|---|
request | ILockTimeSkippingRequest |
Returns
Promise<LockTimeSkippingResponse>
Type declaration
| Name | Type |
|---|---|
name | "LockTimeSkipping" |
path | "/temporal.api.testservice.v1.TestService/LockTimeSkipping" |
requestStream | undefined |
requestType | "LockTimeSkippingRequest" |
responseStream | undefined |
responseType | "LockTimeSkippingResponse" |
LockTimeSkippingCallback
Ƭ LockTimeSkippingCallback: (error: Error | null, response?: LockTimeSkippingResponse) => void
Callback as used by temporal.api.testservice.v1.TestService#lockTimeSkipping.
Type declaration
▸ (error, response?): void
Parameters
| Name | Type | Description |
|---|---|---|
error | Error | null | Error, if any |
response? | LockTimeSkippingResponse | LockTimeSkippingResponse |
Returns
void
Sleep
Ƭ Sleep: Object
This call returns only when the Test Server Time advances by the specified duration. This is an EXPERIMENTAL API.
Call signature
▸ (request, callback): void
Parameters
| Name | Type |
|---|---|
request | ISleepRequest |
callback | SleepCallback |
Returns
void
▸ (request): Promise<SleepResponse>
Parameters
| Name | Type |
|---|---|
request | ISleepRequest |
Returns
Promise<SleepResponse>
Type declaration
| Name | Type |
|---|---|
name | "Sleep" |
path | "/temporal.api.testservice.v1.TestService/Sleep" |
requestStream | undefined |
requestType | "SleepRequest" |
responseStream | undefined |
responseType | "SleepResponse" |
SleepCallback
Ƭ SleepCallback: (error: Error | null, response?: SleepResponse) => void
Callback as used by temporal.api.testservice.v1.TestService#sleep.
Type declaration
▸ (error, response?): void
Parameters
| Name | Type | Description |
|---|---|---|
error | Error | null | Error, if any |
response? | SleepResponse | SleepResponse |
Returns
void
SleepUntil
Ƭ SleepUntil: Object
This call returns only when the Test Server Time advances to the specified timestamp. If the current Test Server Time is beyond the specified timestamp, returns immediately. This is an EXPERIMENTAL API.
Call signature
▸ (request, callback): void
Parameters
| Name | Type |
|---|---|
request | ISleepUntilRequest |
callback | SleepUntilCallback |
Returns
void
▸ (request): Promise<SleepResponse>
Parameters
| Name | Type |
|---|---|
request | ISleepUntilRequest |
Returns
Promise<SleepResponse>
Type declaration
| Name | Type |
|---|---|
name | "SleepUntil" |
path | "/temporal.api.testservice.v1.TestService/SleepUntil" |
requestStream | undefined |
requestType | "SleepUntilRequest" |
responseStream | undefined |
responseType | "SleepResponse" |
SleepUntilCallback
Ƭ SleepUntilCallback: (error: Error | null, response?: SleepResponse) => void
Callback as used by temporal.api.testservice.v1.TestService#sleepUntil.
Type declaration
▸ (error, response?): void
Parameters
| Name | Type | Description |
|---|---|---|
error | Error | null | Error, if any |
response? | SleepResponse | SleepResponse |
Returns
void
UnlockTimeSkipping
Ƭ UnlockTimeSkipping: Object
UnlockTimeSkipping decrements Time Locking Counter by one.
If the counter reaches 0, it unlocks time skipping and fast forwards time. LockTimeSkipping and UnlockTimeSkipping calls are counted. Calling UnlockTimeSkipping does not guarantee that time is going to be fast forwarded as another lock can be holding it.
Time Locking Counter can't be negative, unbalanced calls to UnlockTimeSkipping will lead to rpc call failure
Call signature
▸ (request, callback): void
Parameters
| Name | Type |
|---|---|
request | IUnlockTimeSkippingRequest |
callback | UnlockTimeSkippingCallback |
Returns
void
▸ (request): Promise<UnlockTimeSkippingResponse>
Parameters
| Name | Type |
|---|---|
request | IUnlockTimeSkippingRequest |
Returns
Promise<UnlockTimeSkippingResponse>
Type declaration
| Name | Type |
|---|---|
name | "UnlockTimeSkipping" |
path | "/temporal.api.testservice.v1.TestService/UnlockTimeSkipping" |
requestStream | undefined |
requestType | "UnlockTimeSkippingRequest" |
responseStream | undefined |
responseType | "UnlockTimeSkippingResponse" |
UnlockTimeSkippingCallback
Ƭ UnlockTimeSkippingCallback: (error: Error | null, response?: UnlockTimeSkippingResponse) => void
Callback as used by temporal.api.testservice.v1.TestService#unlockTimeSkipping.
Type declaration
▸ (error, response?): void
Parameters
| Name | Type | Description |
|---|---|---|
error | Error | null | Error, if any |
response? | UnlockTimeSkippingResponse | UnlockTimeSkippingResponse |
Returns
void
UnlockTimeSkippingWithSleep
Ƭ UnlockTimeSkippingWithSleep: Object
UnlockTimeSkippingWhileSleep decreases time locking counter by one and increases it back once the Test Server Time advances by the duration specified in the request.
This call returns only when the Test Server Time advances by the specified duration.
If it is called when Time Locking Counter is
- more than 1 and no other unlocks are coming in, rpc call will block for the specified duration, time will not be fast forwarded.
- 1, it will lead to fast forwarding of the time by the duration specified in the request and quick return of this rpc call.
- 0 will lead to rpc call failure same way as an unbalanced UnlockTimeSkipping.
Call signature
▸ (request, callback): void
Parameters
| Name | Type |
|---|---|
request | ISleepRequest |
callback | UnlockTimeSkippingWithSleepCallback |
Returns
void
▸ (request): Promise<SleepResponse>
Parameters
| Name | Type |
|---|---|
request | ISleepRequest |
Returns
Promise<SleepResponse>
Type declaration
| Name | Type |
|---|---|
name | "UnlockTimeSkippingWithSleep" |
path | "/temporal.api.testservice.v1.TestService/UnlockTimeSkippingWithSleep" |
requestStream | undefined |
requestType | "SleepRequest" |
responseStream | undefined |
responseType | "SleepResponse" |
UnlockTimeSkippingWithSleepCallback
Ƭ UnlockTimeSkippingWithSleepCallback: (error: Error | null, response?: SleepResponse) => void
Callback as used by temporal.api.testservice.v1.TestService#unlockTimeSkippingWithSleep.
Type declaration
▸ (error, response?): void
Parameters
| Name | Type | Description |
|---|---|---|
error | Error | null | Error, if any |
response? | SleepResponse | SleepResponse |
Returns
void