static

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: 4 Imported by: 0

Documentation

Overview

Package static 提供静态内存数据源

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Data 要发送的数据记录
	Data []types.Record `json:"data"`
}

Config Source 的配置

type Source

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

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