Skip to content

Commit

Permalink
update counter example
Browse files Browse the repository at this point in the history
Signed-off-by: a3hadi <[email protected]>
  • Loading branch information
ayildirim21 committed Feb 14, 2024
1 parent e575af5 commit 6a85921
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/reducer/examples/counter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build:

.PHONY: image
image: build
docker build -t "quay.io/numaio/numaflow-go/reduce-counter:v0.6.0" --target counter .
docker build -t "quay.io/numaio/numaflow-go/reduce-counter:v0.6.2" --target counter .

clean:
-rm -rf ./dist
2 changes: 1 addition & 1 deletion pkg/reducer/examples/counter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module counter

go 1.20

require github.com/numaproj/numaflow-go v0.6.1-0.20231219080635-d096c415a42f
require github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069

require (
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
2 changes: 2 additions & 0 deletions pkg/reducer/examples/counter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ github.com/numaproj/numaflow-go v0.6.0 h1:gqTX1u1pFJJhX/3l3zYM8aLqRSHEainYrgBIol
github.com/numaproj/numaflow-go v0.6.0/go.mod h1:5zwvvREIbqaCPCKsNE1MVjVToD0kvkCh2Z90Izlhw5U=
github.com/numaproj/numaflow-go v0.6.1-0.20231219080635-d096c415a42f h1:J43ekeRVzE6WGgkWl5oEQ+c4NT1i4VikMkygu4AeUYE=
github.com/numaproj/numaflow-go v0.6.1-0.20231219080635-d096c415a42f/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI=
github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 h1:LBMIrUytoxuZazEnwxo+WPAxjHL1rrVhphTyByLiDYY=
github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM=
Expand Down
6 changes: 5 additions & 1 deletion pkg/reducer/examples/counter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"log"
"strconv"

"github.com/numaproj/numaflow-go/pkg/reducer"
Expand All @@ -20,5 +21,8 @@ func reduceCounter(_ context.Context, keys []string, inputCh <-chan reducer.Datu
}

func main() {
reducer.NewServer(reducer.SimpleCreatorWithReduceFn(reduceCounter)).Start(context.Background())
err := reducer.NewServer(reducer.SimpleCreatorWithReduceFn(reduceCounter)).Start(context.Background())
if err != nil {
log.Panic("Failed to start server: ", err)
}
}

0 comments on commit 6a85921

Please sign in to comment.