generator

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package generator 提供序列数据生成器

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Count 要生成的记录数,0 表示无限
	Count int `json:"count"`
	// IntervalMs 生成间隔(毫秒),0 表示无间隔,默认 0
	IntervalMs int `json:"interval_ms"`
}

Config Source 的配置

type Source

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

Source 生成序列数据的 Source,用于测试和性能测试

func New

func New() *Source

New 创建新的 Source

func (*Source) Init

func (s *Source) Init(config []byte) error

Init 初始化 Source

func (*Source) Read

func (s *Source) Read(ctx context.Context, out chan<- types.Record) (int64, error)

Read 生成序列数据

Jump to

Keyboard shortcuts

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