Open
Description
The cloudevents sdk-go currently offers support for various protocol implementations, except for gRPC.
It is essential to add gRPC protocol support since it is widely used.
While the cloudevent proto is presented in the repository, it lacks the RPC service definition necessary for implementing the gRPC protocol in cloud event sdk-go.
To enable gRPC functionality, defining the RPC service and method is imperative. This ensures cloudevents sdk-go to send and receive through the generated golang gRPC client.
Can we incorporate the RPC service and method into the cloudevent proto in the following manner:
Next, utilize protoc
to generate the RPC client and server code, which can be employed to implement the gRPC protocol as follows:
# cat protocol/grpc/protocol.go
...
// protocol for grpc
// define protocol for grpc
type Protocol struct {
client pb.CloudEventServiceClient
publishOption *PublishOption
subscribeOption *SubscribeOption
// receiver
incoming chan *pb.CloudEvent
// inOpen
openerMutex sync.Mutex
closeChan chan struct{}
}
...
Metadata
Metadata
Assignees
Labels
No labels