output

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

Documentation

Overview

Package output 提供控制台输出的 Sink

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Format 输出格式: json, line, table
	Format string `json:"format"`
	// Limit 输出条数限制,0 表示无限制
	Limit int `json:"limit"`
}

Config Sink 的配置

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) Init

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

Init 初始化 Sink

Jump to

Keyboard shortcuts

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