jqtransform

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 jqtransform 提供基于 jq 语法的超级转换处理器

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Query jq 查询表达式
	// 示例: "{user_id: .id, name: .name, total: (.items | map(.price) | add)}"
	Query string `json:"query"`
}

Config Processor 的配置

type Processor

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

Processor 使用 jq 语法进行数据转换

func New

func New() *Processor

New 创建新的 Processor

func (*Processor) ConcurrencyCap

func (p *Processor) ConcurrencyCap() dataflow.ConcurrencyCap

ConcurrencyCap 声明支持并发

func (*Processor) Init

func (p *Processor) Init(config []byte) error

Init 初始化 Processor

func (*Processor) Process

func (p *Processor) Process(ctx context.Context, in <-chan types.Record, out chan<- types.Record) error

Process 处理数据,使用 jq 表达式转换记录

Jump to

Keyboard shortcuts

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