Created
January 21, 2019 08:23
-
-
Save plutov/6abea7a8aa2ad97637d04527bac2405d to your computer and use it in GitHub Desktop.
consumer.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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