{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeApplications #-}
module Temporal.Core.Client.TestService where
import Data.ProtoLens (Message (defMessage))
import Proto.Temporal.Api.Testservice.V1.RequestResponse
import Proto.Temporal.Api.Testservice.V1.Service
import Temporal.Core.Client
import Temporal.Internal.FFI
foreign import ccall "hs_get_current_time" hs_get_current_time :: PrimRpcCall
getCurrentTime :: Client -> IO (Either RpcError GetCurrentTimeResponse)
getCurrentTime :: Client -> IO (Either RpcError GetCurrentTimeResponse)
getCurrentTime Client
client = forall svc (t :: Symbol).
HasMethodImpl svc t =>
PrimRpcCall
-> Client
-> MethodInput svc t
-> IO (Either RpcError (MethodOutput svc t))
call @TestService @"getCurrentTime" PrimRpcCall
hs_get_current_time Client
client MethodInput TestService "getCurrentTime"
Empty
forall msg. Message msg => msg
defMessage
foreign import ccall "hs_lock_time_skipping" hs_lock_time_skipping :: PrimRpcCall
lockTimeSkipping :: Client -> LockTimeSkippingRequest -> IO (Either RpcError LockTimeSkippingResponse)
lockTimeSkipping :: Client
-> LockTimeSkippingRequest
-> IO (Either RpcError LockTimeSkippingResponse)
lockTimeSkipping = forall svc (t :: Symbol).
HasMethodImpl svc t =>
PrimRpcCall
-> Client
-> MethodInput svc t
-> IO (Either RpcError (MethodOutput svc t))
call @TestService @"lockTimeSkipping" PrimRpcCall
hs_lock_time_skipping
foreign import ccall "hs_sleep_until" hs_sleep_until :: PrimRpcCall
sleepUntil :: Client -> SleepUntilRequest -> IO (Either RpcError SleepResponse)
sleepUntil :: Client -> SleepUntilRequest -> IO (Either RpcError SleepResponse)
sleepUntil = forall svc (t :: Symbol).
HasMethodImpl svc t =>
PrimRpcCall
-> Client
-> MethodInput svc t
-> IO (Either RpcError (MethodOutput svc t))
call @TestService @"sleepUntil" PrimRpcCall
hs_sleep_until
foreign import ccall "hs_sleep" hs_sleep :: PrimRpcCall
sleep :: Client -> SleepRequest -> IO (Either RpcError SleepResponse)
sleep :: Client -> SleepRequest -> IO (Either RpcError SleepResponse)
sleep = forall svc (t :: Symbol).
HasMethodImpl svc t =>
PrimRpcCall
-> Client
-> MethodInput svc t
-> IO (Either RpcError (MethodOutput svc t))
call @TestService @"sleep" PrimRpcCall
hs_sleep
foreign import ccall "hs_unlock_time_skipping_with_sleep" hs_unlock_time_skipping_with_sleep :: PrimRpcCall
unlockTimeSkippingWithSleep :: Client -> SleepRequest -> IO (Either RpcError SleepResponse)
unlockTimeSkippingWithSleep :: Client -> SleepRequest -> IO (Either RpcError SleepResponse)
unlockTimeSkippingWithSleep = forall svc (t :: Symbol).
HasMethodImpl svc t =>
PrimRpcCall
-> Client
-> MethodInput svc t
-> IO (Either RpcError (MethodOutput svc t))
call @TestService @"unlockTimeSkippingWithSleep" PrimRpcCall
hs_unlock_time_skipping_with_sleep
foreign import ccall "hs_unlock_time_skipping" hs_unlock_time_skipping :: PrimRpcCall
unlockTimeSkipping :: Client -> UnlockTimeSkippingRequest -> IO (Either RpcError UnlockTimeSkippingResponse)
unlockTimeSkipping :: Client
-> UnlockTimeSkippingRequest
-> IO (Either RpcError UnlockTimeSkippingResponse)
unlockTimeSkipping = forall svc (t :: Symbol).
HasMethodImpl svc t =>
PrimRpcCall
-> Client
-> MethodInput svc t
-> IO (Either RpcError (MethodOutput svc t))
call @TestService @"unlockTimeSkipping" PrimRpcCall
hs_unlock_time_skipping