Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithTemporalAddress ¶
func WithTemporalAddress(addr string) func(*client)
WithTemporalAddress sets the address of the temporal server. This is used when the temporal client is not provided directly.
func WithTemporalClient ¶
func WithTemporalClient(cl temporalclient.Client) func(*client)
WithTemporalClient sets the temporal client directly.
func WithTemporalLogger ¶
func WithTemporalLogger(logger temporalLog.Logger) func(*client)
WithTemporalLogger sets the logger for the temporal client.
Types ¶
type Client ¶
type Client interface {
// NewBacktest creates a new backtest.
NewBacktest(
ctx context.Context,
params backtest.Parameters,
callbacks runtime.Callbacks,
) (backtestsclient.Backtest, error)
// GetBacktest gets a backtest.
GetBacktest(
ctx context.Context,
params backtestsapi.GetBacktestWorkflowParams,
) (backtestsclient.Backtest, error)
// ListBacktests lists backtests.
ListBacktests(
ctx context.Context,
params backtestsapi.ListBacktestsWorkflowParams,
) ([]backtestsclient.Backtest, error)
// ListCandlesticks calls the candlesticks list workflow.
ListCandlesticks(
ctx context.Context,
params candlesticksapi.ListCandlesticksWorkflowParams,
) (res candlesticksapi.ListCandlesticksWorkflowResults, err error)
// GetExchange retrieves an exchange by name.
GetExchange(
ctx context.Context,
params exchangesapi.GetExchangeWorkflowParams,
) (exchangesapi.GetExchangeWorkflowResults, error)
// ListExchanges retrieves a list of exchanges.
ListExchanges(
ctx context.Context,
params exchangesapi.ListExchangesWorkflowParams,
) (exchangesapi.ListExchangesWorkflowResults, error)
// ListSMA retrieves a list of simple moving averages (SMA) for a specific exchange and trading pair.
ListSMA(
ctx context.Context,
params smaapi.ListWorkflowParams,
) (res smaapi.ListWorkflowResults, err error)
// NewForwardtest creates a new forwardtest.
NewForwardtest(
ctx context.Context,
params forwardtestsapi.CreateForwardtestWorkflowParams,
) (forwardtestsclient.Forwardtest, error)
// ListForwardtests lists the forwardtests.
ListForwardtests(
ctx context.Context,
params forwardtestsapi.ListForwardtestsWorkflowParams,
) ([]forwardtestsclient.Forwardtest, error)
// ListenToTicks listens to ticks from a specific exchange and trading pair.
ListenToTicks(
ctx context.Context,
listener ticksclient.ListenerParams,
exchange, pair string,
) error
// StopListeningToTicks unregisters a callback workflow from ticks for a given exchange and pair.
StopListeningToTicks(
ctx context.Context,
listener uuid.UUID,
exchange string,
pair string,
) error
// ServicesInfo retrieves information about the services.
ServicesInfo(ctx context.Context) (map[string]any, error)
GetTemporalClient() temporalclient.Client
Close()
}
Client is a client for the Cryptellation stack.
type DummyLogger ¶
type DummyLogger struct{}
DummyLogger is a no-op logger implementation for the temporal client.
func (*DummyLogger) Debug ¶
func (log *DummyLogger) Debug(_ string, _ ...interface{})
Debug is a no-op method for logging debug messages.
func (*DummyLogger) Error ¶
func (log *DummyLogger) Error(_ string, _ ...interface{})
Error is a no-op method for logging error messages.
func (*DummyLogger) Info ¶
func (log *DummyLogger) Info(_ string, _ ...interface{})
Info is a no-op method for logging info messages.
func (*DummyLogger) Warn ¶
func (log *DummyLogger) Warn(_ string, _ ...interface{})
Warn is a no-op method for logging warning messages.
Click to show internal directories.
Click to hide internal directories.