-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
1,225 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
syntax = "proto3"; | ||
package greeting; | ||
|
||
option go_package = "github.com/knqyf263/go-plugin/examples/host-functions/greeting"; | ||
|
||
// The greeting service definition. | ||
// go:plugin type=plugin version=1 | ||
service Greeter { | ||
// Sends a greeting | ||
rpc Greet(GreetRequest) returns (GreetReply) {} | ||
} | ||
|
||
// The request message containing the user's name. | ||
message GreetRequest { | ||
string name = 1; | ||
} | ||
|
||
// The response message containing the greetings | ||
message GreetReply { string message = 1; } | ||
|
||
// The host functions embedded into the plugin | ||
// go:plugin type=host | ||
service HostFunctions { | ||
// Sends a HTTP GET request | ||
rpc HttpGet(HttpGetRequest) returns (HttpGetResponse) {} | ||
} | ||
|
||
message HttpGetRequest{ | ||
string url = 1; | ||
} | ||
|
||
message HttpGetResponse { | ||
bytes response = 1; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.