Skip to content

Instantly share code, notes, and snippets.

@plutov
Created January 21, 2019 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plutov/6abea7a8aa2ad97637d04527bac2405d to your computer and use it in GitHub Desktop.
Save plutov/6abea7a8aa2ad97637d04527bac2405d to your computer and use it in GitHub Desktop.
consumer.go
package consumer
import (
"context"
"log"
)
type event struct {
Data []byte
}
// Receive func logs an event payload
func Receive(ctx context.Context, e event) error {
log.Printf("%s", string(e.Data))
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment