Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backtest ¶
Backtest is a local representation of a backtest running on the Cryptellation API.
type Client ¶
type Client interface {
// NewBacktest creates a new backtest.
NewBacktest(
ctx context.Context,
params backtest.Parameters,
callbacks runtime.Callbacks,
) (Backtest, error)
// GetBacktest gets a backtest.
GetBacktest(
ctx context.Context,
params api.GetBacktestWorkflowParams,
) (Backtest, error)
// ListBacktests lists backtests.
ListBacktests(
ctx context.Context,
params api.ListBacktestsWorkflowParams,
) ([]Backtest, error)
// Info calls the service info.
Info(ctx context.Context) (api.ServiceInfoResults, error)
}
Client is a client for the cryptellation backtests service.
func New ¶
func New(cl temporalclient.Client) Client
New creates a new client to execute temporal workflows.
type CreateParams ¶ added in v1.1.0
type CreateParams struct {
BacktestParameters backtest.Parameters
Runner runtime.Runnable
Worker worker.Worker
TaskQueue string
}
CreateParams contains parameters for creating a backtest.
type RawClient ¶
type RawClient interface {
CreateBacktest(
ctx context.Context,
params api.CreateBacktestWorkflowParams,
) (api.CreateBacktestWorkflowResults, error)
RunBacktest(
ctx context.Context,
params api.RunBacktestWorkflowParams,
) (api.RunBacktestWorkflowResults, error)
GetBacktest(
ctx context.Context,
params api.GetBacktestWorkflowParams,
) (api.GetBacktestWorkflowResults, error)
ListBacktests(
ctx context.Context,
params api.ListBacktestsWorkflowParams,
) (api.ListBacktestsWorkflowResults, error)
SubscribeToPrice(
ctx context.Context,
params api.SubscribeToPriceWorkflowParams,
) (api.SubscribeToPriceWorkflowResults, error)
}
RawClient is a client for the cryptellation backtests service with just the calls to the temporal workflows.
func NewRaw ¶
func NewRaw(cl temporalclient.Client) RawClient
NewRaw creates a new raw client to execute temporal workflows.
type WfClient ¶
type WfClient interface {
// SubscribeToPrice subscribes to specific price updates.
SubscribeToPrice(
ctx workflow.Context,
params api.SubscribeToPriceWorkflowParams,
) (api.SubscribeToPriceWorkflowResults, error)
}
WfClient is a client for the cryptellation backtests service from a workflow perspective.
func NewWfClient ¶
func NewWfClient() WfClient
NewWfClient creates a new workflow client. This client is used to call workflows from within other workflows. It is not used to call workflows from outside the workflow environment.