mirror of
https://github.com/openziti/zrok.git
synced 2025-01-22 05:48:46 +01:00
'proto3' (#463)
This commit is contained in:
parent
a89d8ef178
commit
84c7e26202
@ -63,7 +63,7 @@ type VersionReply struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
V *string `protobuf:"bytes,1,req,name=v" json:"v,omitempty"`
|
||||
V string `protobuf:"bytes,1,opt,name=v,proto3" json:"v,omitempty"`
|
||||
}
|
||||
|
||||
func (x *VersionReply) Reset() {
|
||||
@ -99,8 +99,8 @@ func (*VersionReply) Descriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
func (x *VersionReply) GetV() string {
|
||||
if x != nil && x.V != nil {
|
||||
return *x.V
|
||||
if x != nil {
|
||||
return x.V
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@ -112,13 +112,14 @@ var file_agent_agentGrpc_agent_proto_rawDesc = []byte{
|
||||
0x63, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x10, 0x0a,
|
||||
0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
|
||||
0x1c, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12,
|
||||
0x0c, 0x0a, 0x01, 0x76, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x01, 0x76, 0x32, 0x34, 0x0a,
|
||||
0x0c, 0x0a, 0x01, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76, 0x32, 0x34, 0x0a,
|
||||
0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x0f, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c,
|
||||
0x79, 0x22, 0x00, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x7a, 0x69, 0x74, 0x69, 0x2f, 0x7a, 0x72, 0x6f, 0x6b, 0x2f,
|
||||
0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x70, 0x63,
|
||||
0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x70, 0x63, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -1,3 +1,5 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "github.com/openziti/zrok/agent/agentGrpc";
|
||||
|
||||
service Agent {
|
||||
@ -8,5 +10,5 @@ message VersionRequest {
|
||||
}
|
||||
|
||||
message VersionReply {
|
||||
required string v = 1;
|
||||
string v = 1;
|
||||
}
|
||||
|
@ -14,5 +14,5 @@ type agentGrpcImpl struct {
|
||||
func (s *agentGrpcImpl) Version(_ context.Context, _ *agentGrpc.VersionRequest) (*agentGrpc.VersionReply, error) {
|
||||
v := build.String()
|
||||
logrus.Infof("responding to version inquiry with '%v'", v)
|
||||
return &agentGrpc.VersionReply{V: &v}, nil
|
||||
return &agentGrpc.VersionReply{V: v}, nil
|
||||
}
|
||||
|
@ -61,5 +61,5 @@ func (cmd *agentVersionCommand) run(_ *cobra.Command, _ []string) {
|
||||
tui.Error("error getting agent version", err)
|
||||
}
|
||||
|
||||
println(*v.V)
|
||||
println(v.GetV())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user