Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func main() {
}

// Handle real-time transformation results
ssql.Stream().AddSink(func(result interface{}) {
ssql.AddSink(func(result interface{}) {
fmt.Printf("Real-time result: %+v\n", result)
})

Expand Down Expand Up @@ -110,7 +110,7 @@ func main() {

// Process data one by one, each will output results immediately
for _, data := range sensorData {
ssql.Stream().AddData(data)
ssql.Emit(data)
time.Sleep(100 * time.Millisecond) // Simulate real-time data arrival
}

Expand Down Expand Up @@ -273,7 +273,7 @@ func main() {
}

// Handle aggregation results
ssql.Stream().AddSink(func(result interface{}) {
ssql.AddSink(func(result interface{}) {
fmt.Printf("Aggregation result: %+v\n", result)
})

Expand All @@ -293,7 +293,7 @@ func main() {
"timestamp": time.Now().Unix(),
}

ssql.Stream().AddData(nestedData)
ssql.Emit(nestedData)
}
```

Expand Down
8 changes: 4 additions & 4 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func main() {
}

// 处理实时转换结果
ssql.Stream().AddSink(func(result interface{}) {
ssql.AddSink(func(result interface{}) {
fmt.Printf("实时处理结果: %+v\n", result)
})

Expand Down Expand Up @@ -113,7 +113,7 @@ func main() {

// 逐条处理数据,每条都会立即输出结果
for _, data := range sensorData {
ssql.Stream().AddData(data)
ssql.Emit(data)
time.Sleep(100 * time.Millisecond) // 模拟实时数据到达
}

Expand Down Expand Up @@ -289,7 +289,7 @@ func main() {
}

// 处理聚合结果
ssql.Stream().AddSink(func(result interface{}) {
ssql.AddSink(func(result interface{}) {
fmt.Printf("聚合结果: %+v\n", result)
})

Expand All @@ -309,7 +309,7 @@ func main() {
"timestamp": time.Now().Unix(),
}

ssql.Stream().AddData(nestedData)
ssql.Emit(nestedData)
}
```

Expand Down
Loading
Loading