|
|
|
@ -9,8 +9,6 @@ It is generated from these files:
|
|
|
|
|
gosuv.proto
|
|
|
|
|
|
|
|
|
|
It has these top-level messages:
|
|
|
|
|
CtrlRequest
|
|
|
|
|
CtrlResponse
|
|
|
|
|
NopRequest
|
|
|
|
|
Response
|
|
|
|
|
Request
|
|
|
|
@ -33,46 +31,6 @@ var _ = proto.Marshal
|
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
|
var _ = math.Inf
|
|
|
|
|
|
|
|
|
|
type CtrlRequest struct {
|
|
|
|
|
Action *string `protobuf:"bytes,1,req,name=action" json:"action,omitempty"`
|
|
|
|
|
Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *CtrlRequest) Reset() { *m = CtrlRequest{} }
|
|
|
|
|
func (m *CtrlRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*CtrlRequest) ProtoMessage() {}
|
|
|
|
|
|
|
|
|
|
func (m *CtrlRequest) GetAction() string {
|
|
|
|
|
if m != nil && m.Action != nil {
|
|
|
|
|
return *m.Action
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *CtrlRequest) GetName() string {
|
|
|
|
|
if m != nil && m.Name != nil {
|
|
|
|
|
return *m.Name
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CtrlResponse struct {
|
|
|
|
|
Value *string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *CtrlResponse) Reset() { *m = CtrlResponse{} }
|
|
|
|
|
func (m *CtrlResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*CtrlResponse) ProtoMessage() {}
|
|
|
|
|
|
|
|
|
|
func (m *CtrlResponse) GetValue() string {
|
|
|
|
|
if m != nil && m.Value != nil {
|
|
|
|
|
return *m.Value
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type NopRequest struct {
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
}
|
|
|
|
@ -176,7 +134,6 @@ var _ grpc.ClientConn
|
|
|
|
|
// Client API for GoSuv service
|
|
|
|
|
|
|
|
|
|
type GoSuvClient interface {
|
|
|
|
|
Control(ctx context.Context, in *CtrlRequest, opts ...grpc.CallOption) (*CtrlResponse, error)
|
|
|
|
|
Shutdown(ctx context.Context, in *NopRequest, opts ...grpc.CallOption) (*Response, error)
|
|
|
|
|
Version(ctx context.Context, in *NopRequest, opts ...grpc.CallOption) (*Response, error)
|
|
|
|
|
Status(ctx context.Context, in *NopRequest, opts ...grpc.CallOption) (*StatusResponse, error)
|
|
|
|
@ -190,15 +147,6 @@ func NewGoSuvClient(cc *grpc.ClientConn) GoSuvClient {
|
|
|
|
|
return &goSuvClient{cc}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *goSuvClient) Control(ctx context.Context, in *CtrlRequest, opts ...grpc.CallOption) (*CtrlResponse, error) {
|
|
|
|
|
out := new(CtrlResponse)
|
|
|
|
|
err := grpc.Invoke(ctx, "/gosuvpb.GoSuv/Control", in, out, c.cc, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *goSuvClient) Shutdown(ctx context.Context, in *NopRequest, opts ...grpc.CallOption) (*Response, error) {
|
|
|
|
|
out := new(Response)
|
|
|
|
|
err := grpc.Invoke(ctx, "/gosuvpb.GoSuv/Shutdown", in, out, c.cc, opts...)
|
|
|
|
@ -229,7 +177,6 @@ func (c *goSuvClient) Status(ctx context.Context, in *NopRequest, opts ...grpc.C
|
|
|
|
|
// Server API for GoSuv service
|
|
|
|
|
|
|
|
|
|
type GoSuvServer interface {
|
|
|
|
|
Control(context.Context, *CtrlRequest) (*CtrlResponse, error)
|
|
|
|
|
Shutdown(context.Context, *NopRequest) (*Response, error)
|
|
|
|
|
Version(context.Context, *NopRequest) (*Response, error)
|
|
|
|
|
Status(context.Context, *NopRequest) (*StatusResponse, error)
|
|
|
|
@ -239,18 +186,6 @@ func RegisterGoSuvServer(s *grpc.Server, srv GoSuvServer) {
|
|
|
|
|
s.RegisterService(&_GoSuv_serviceDesc, srv)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _GoSuv_Control_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
|
|
|
|
|
in := new(CtrlRequest)
|
|
|
|
|
if err := codec.Unmarshal(buf, in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
out, err := srv.(GoSuvServer).Control(ctx, in)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _GoSuv_Shutdown_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
|
|
|
|
|
in := new(NopRequest)
|
|
|
|
|
if err := codec.Unmarshal(buf, in); err != nil {
|
|
|
|
@ -291,10 +226,6 @@ var _GoSuv_serviceDesc = grpc.ServiceDesc{
|
|
|
|
|
ServiceName: "gosuvpb.GoSuv",
|
|
|
|
|
HandlerType: (*GoSuvServer)(nil),
|
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
|
{
|
|
|
|
|
MethodName: "Control",
|
|
|
|
|
Handler: _GoSuv_Control_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "Shutdown",
|
|
|
|
|
Handler: _GoSuv_Shutdown_Handler,
|
|
|
|
|