prefetch

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package prefetch builds wasm bots preloaded with necessary information

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotImage

type BotImage struct {
	// contains filtered or unexported fields
}

func (*BotImage) Path

func (bi *BotImage) Path() string

type Prefetcher

type Prefetcher struct {
	// contains filtered or unexported fields
}

func Create

func Create(ctx context.Context, wg *sync.WaitGroup, stateClient state.Client) (*Prefetcher, error)

func (*Prefetcher) Build

func (pf *Prefetcher) Build(ctx context.Context, targetRepositoryPath string, listLoader []StaticLoader) (*BotImage, error)

Build an image. Take the data from prefetch (e.g. Orca pool data) and write the Json files into the Rust code base so that those files can be statically compiled into the web assembly binary.

func (*Prefetcher) State

func (pf *Prefetcher) State() state.Client

type StaticLoader

type StaticLoader interface {
	// modify arguments to cargo build
	Args([]string) ([]string, error)
	// put in files that can be statically compiled into the wasm bot
	Load(string, *trading.TradingPair) error
	// Env set environmental variables
	Env(map[string]string) error
}

Source Files

  • prefetch.go
  • rust.go

Directories

Path Synopsis
Package orca preloads Orca Whirlpool trading pools.
Package orca preloads Orca Whirlpool trading pools.
Package trading holds common structs
Package trading holds common structs

Jump to

Keyboard shortcuts

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