file

package
v0.0.0-...-2389557 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVFile

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

CSVFile CSV文件逐笔数据流

func NewCSVFile

func NewCSVFile() *CSVFile

NewCSVFile 创建CSV数据流

func (*CSVFile) Connect

func (f *CSVFile) Connect(ctx context.Context, id string, request *CSVFileRequest) error

Connect 流式读取CSV文件

func (*CSVFile) Disconnect

func (f *CSVFile) Disconnect() error

Disconnect 关闭CSV数据流

func (*CSVFile) ID

func (f *CSVFile) ID() string

ID 返回该Stream的唯一ID

type CSVFileRequest

type CSVFileRequest struct {
	// Dir 数据目录
	Dir string
	// Start 开始时间
	Start int64
	// End 结束时间
	End int64
	// Handler 处理函数,用于处理每一个TradeEvent
	Handler func(trade types.TradeEvent)
	// ErrorHandler 错误处理函数
	ErrorHandler func(err error)
	// CloseHandler 关闭处理函数
	CloseHandler func()
}

CSVFileRequest 请求参数

Jump to

Keyboard shortcuts

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