[dev] regen
This commit is contained in:
@@ -18,122 +18,122 @@ import (
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// CollectorClient is the client API for Collector service.
|
||||
// PluginClient is the client API for Plugin service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type CollectorClient interface {
|
||||
type PluginClient interface {
|
||||
Exec(ctx context.Context, in *ExecIn, opts ...grpc.CallOption) (*ExecOut, error)
|
||||
Services(ctx context.Context, in *ServicesIn, opts ...grpc.CallOption) (*ServicesOut, error)
|
||||
List(ctx context.Context, in *ListIn, opts ...grpc.CallOption) (*ListOut, error)
|
||||
}
|
||||
|
||||
type collectorClient struct {
|
||||
type pluginClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewCollectorClient(cc grpc.ClientConnInterface) CollectorClient {
|
||||
return &collectorClient{cc}
|
||||
func NewPluginClient(cc grpc.ClientConnInterface) PluginClient {
|
||||
return &pluginClient{cc}
|
||||
}
|
||||
|
||||
func (c *collectorClient) Exec(ctx context.Context, in *ExecIn, opts ...grpc.CallOption) (*ExecOut, error) {
|
||||
func (c *pluginClient) Exec(ctx context.Context, in *ExecIn, opts ...grpc.CallOption) (*ExecOut, error) {
|
||||
out := new(ExecOut)
|
||||
err := c.cc.Invoke(ctx, "/plugin.Collector/Exec", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/plugin.Plugin/Exec", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *collectorClient) Services(ctx context.Context, in *ServicesIn, opts ...grpc.CallOption) (*ServicesOut, error) {
|
||||
out := new(ServicesOut)
|
||||
err := c.cc.Invoke(ctx, "/plugin.Collector/Services", in, out, opts...)
|
||||
func (c *pluginClient) List(ctx context.Context, in *ListIn, opts ...grpc.CallOption) (*ListOut, error) {
|
||||
out := new(ListOut)
|
||||
err := c.cc.Invoke(ctx, "/plugin.Plugin/List", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// CollectorServer is the server API for Collector service.
|
||||
// All implementations must embed UnimplementedCollectorServer
|
||||
// PluginServer is the server API for Plugin service.
|
||||
// All implementations must embed UnimplementedPluginServer
|
||||
// for forward compatibility
|
||||
type CollectorServer interface {
|
||||
type PluginServer interface {
|
||||
Exec(context.Context, *ExecIn) (*ExecOut, error)
|
||||
Services(context.Context, *ServicesIn) (*ServicesOut, error)
|
||||
mustEmbedUnimplementedCollectorServer()
|
||||
List(context.Context, *ListIn) (*ListOut, error)
|
||||
mustEmbedUnimplementedPluginServer()
|
||||
}
|
||||
|
||||
// UnimplementedCollectorServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedCollectorServer struct {
|
||||
// UnimplementedPluginServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedPluginServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedCollectorServer) Exec(context.Context, *ExecIn) (*ExecOut, error) {
|
||||
func (UnimplementedPluginServer) Exec(context.Context, *ExecIn) (*ExecOut, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented")
|
||||
}
|
||||
func (UnimplementedCollectorServer) Services(context.Context, *ServicesIn) (*ServicesOut, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Services not implemented")
|
||||
func (UnimplementedPluginServer) List(context.Context, *ListIn) (*ListOut, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||
}
|
||||
func (UnimplementedCollectorServer) mustEmbedUnimplementedCollectorServer() {}
|
||||
func (UnimplementedPluginServer) mustEmbedUnimplementedPluginServer() {}
|
||||
|
||||
// UnsafeCollectorServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to CollectorServer will
|
||||
// UnsafePluginServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PluginServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeCollectorServer interface {
|
||||
mustEmbedUnimplementedCollectorServer()
|
||||
type UnsafePluginServer interface {
|
||||
mustEmbedUnimplementedPluginServer()
|
||||
}
|
||||
|
||||
func RegisterCollectorServer(s grpc.ServiceRegistrar, srv CollectorServer) {
|
||||
s.RegisterService(&Collector_ServiceDesc, srv)
|
||||
func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer) {
|
||||
s.RegisterService(&Plugin_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Collector_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _Plugin_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExecIn)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(CollectorServer).Exec(ctx, in)
|
||||
return srv.(PluginServer).Exec(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/plugin.Collector/Exec",
|
||||
FullMethod: "/plugin.Plugin/Exec",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(CollectorServer).Exec(ctx, req.(*ExecIn))
|
||||
return srv.(PluginServer).Exec(ctx, req.(*ExecIn))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Collector_Services_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ServicesIn)
|
||||
func _Plugin_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListIn)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(CollectorServer).Services(ctx, in)
|
||||
return srv.(PluginServer).List(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/plugin.Collector/Services",
|
||||
FullMethod: "/plugin.Plugin/List",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(CollectorServer).Services(ctx, req.(*ServicesIn))
|
||||
return srv.(PluginServer).List(ctx, req.(*ListIn))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Collector_ServiceDesc is the grpc.ServiceDesc for Collector service.
|
||||
// Plugin_ServiceDesc is the grpc.ServiceDesc for Plugin service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Collector_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "plugin.Collector",
|
||||
HandlerType: (*CollectorServer)(nil),
|
||||
var Plugin_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "plugin.Plugin",
|
||||
HandlerType: (*PluginServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Exec",
|
||||
Handler: _Collector_Exec_Handler,
|
||||
Handler: _Plugin_Exec_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Services",
|
||||
Handler: _Collector_Services_Handler,
|
||||
MethodName: "List",
|
||||
Handler: _Plugin_List_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
|
||||
Reference in New Issue
Block a user