Skip to content

Commit

Permalink
add doc for protobuf update.
Browse files Browse the repository at this point in the history
Signed-off-by: morvencao <[email protected]>
  • Loading branch information
morvencao committed Dec 14, 2023
1 parent 65dafeb commit 3012fe5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
30 changes: 30 additions & 0 deletions cloudevents/generic/options/grpc/protobuf/v1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# CloudEvent gRPC Protobuf Definitions

## Overview

This repository includes the protobuf message and RPC method definitions for CloudEvent gRPC service, along with the corresponding Go code generated from these definitions.

## Getting Started

### Prerequisites

Make sure you have the following tools installed:

- [Protocol Compiler (protoc)](https://grpc.io/docs/protoc-installation/)
- Go plugins for the protocol compiler:

```bash
$ go install google.golang.org/protobuf/cmd/protoc-gen-go
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
```

### Updating CloudEvent gRPC Service

1. Modify the `*.proto` files to reflect your desired changes.
2. Run the following command to update the generated code:

```bash
go generate
```

This step is crucial to ensure that your changes are applied to both the gRPC server and client stub.
4 changes: 4 additions & 0 deletions cloudevents/generic/options/grpc/protobuf/v1/cloudevent.proto
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// After making changes to the *.proto files, always run the following
// command in current directory to update the generated code:
// go generate

syntax = "proto3";

package io.cloudevents.v1;
Expand Down

0 comments on commit 3012fe5

Please sign in to comment.