Skip to content

Commit

Permalink
demo: use SendToLeader wrapper instead
Browse files Browse the repository at this point in the history
  • Loading branch information
flowerinthenight committed Jul 17, 2024
1 parent f6dadf9 commit 6132ea8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/demo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func main() {
}

log.Printf("sending %q msg to leader...", msg)
v, err := op.Send(context.Background(), []byte(msg))
v, err := hedge.SendToLeader(context.Background(), op, []byte(msg))
if err != nil {
w.Write([]byte(err.Error()))
return
Expand Down Expand Up @@ -435,6 +435,7 @@ func main() {
w.Write([]byte("OK"))
})

// NOTE: Used only on my local environment.
mux.HandleFunc("/soslocal", func(w http.ResponseWriter, r *http.Request) {
defer func(start time.Time) {
slog.Info("distmem:", "duration", time.Since(start))
Expand Down

0 comments on commit 6132ea8

Please sign in to comment.