clients

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2025 License: GPL-3.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backtest

type Backtest struct {
	ID uuid.UUID
	// contains filtered or unexported fields
}

Backtest is a local representation of a backtest running on the Cryptellation API.

func (*Backtest) Run

func (bt *Backtest) Run(ctx context.Context) error

Run starts the backtest on 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

New creates a new client to execute temporal workflows.

type RawClient

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL