Skip to content

Commit

Permalink
Change protoreflect.ProtoMessage to proto.Message
Browse files Browse the repository at this point in the history
  • Loading branch information
d-lowl committed Oct 20, 2021
1 parent 590c15f commit d19fc8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"fmt"
log "github.com/sirupsen/logrus"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"
"io"
)
Expand Down Expand Up @@ -85,8 +86,7 @@ func NewPubSubDecoder() (IPubSub, error) {
}

// PublishMessage publishes the message to the Pub/Sub topic
//TODO should use proto.Message instead
func (p *PubSub) PublishMessage(topicID string, message protoreflect.ProtoMessage) error {
func (p *PubSub) PublishMessage(topicID string, message proto.Message) error {
messageBytes, err := protojson.MarshalOptions{UseProtoNames: true}.Marshal(message)
if err != nil {
return err
Expand Down

0 comments on commit d19fc8c

Please sign in to comment.