Skip to content

Conversation

radeksimko
Copy link
Member

Closes #158

Copy link
Member

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured this example is ok to merge, given that we've closed out Read/Write in core. I've got some suggestions for the README but it's not a blocker

Comment on lines +3 to +5
This example builds a plugin & client which can stream larger amount of data
between them while staying below reasonable message size limits of the gRPC
protocol.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This example builds a plugin & client which can stream larger amount of data
between them while staying below reasonable message size limits of the gRPC
protocol.
This example builds a plugin & client which can stream a large amount of data
between them while staying below reasonable message size limits of the gRPC
protocol.
>Note: [hashicorp/go-plugin sets an upper limit on message size](https://github.com/hashicorp/go-plugin/blob/d0d30899ca2d91b0869cb73db95afca180e769cf/grpc_client.go#L39-L41). At time of writing, that value is `math.MaxInt32` bytes, or approximately 2GB.


## To execute

Build the plugin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Build the plugin
Navigate into this example directory
\```
cd examples/streaming
\```
Next, build the streamer plugin:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how the ``` will behave if the suggestion is accepted. I think the slash will be present in the eventual markdown.

go build -o ./plugin/streamer ./plugin
```

launch client
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
launch client
Finally launch the client:

Comment on lines +20 to +21

## To re-generate protobuf definitions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## To re-generate protobuf definitions
The client will first write data to the steamer plugin, and then the client will read that
data back from the plugin. The plugin writes the data it receives in a file called `myfile`,
due to the argument passed to the client above.
## To re-generate protobuf definitions

@SarahFrench
Copy link
Member

Ah of course we need review from the codeowner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gRPC stream example?

2 participants