collect

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package collect 提供内存收集的 Sink,主要用于测试

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sink

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

Sink 将数据收集到内存中

func New

func New() *Sink

New 创建新的 Sink

func (*Sink) Consume

func (s *Sink) Consume(ctx context.Context, in <-chan types.Record) error

Consume 收集数据到内存

func (*Sink) Count

func (s *Sink) Count() int

Count 返回收集的数据数量

func (*Sink) Data

func (s *Sink) Data() []types.Record

Data 返回收集的数据

func (*Sink) Init

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

Init 初始化 Sink (无配置)

func (*Sink) Reset

func (s *Sink) Reset()

Reset 清空收集的数据

Jump to

Keyboard shortcuts

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