helpers/runner_wrapper/api/proto/wrapper_grpc.pb.go (149 lines of code) (raw):

// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc v5.28.2 // source: proto/wrapper.proto package proto import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( ProcessWrapper_CheckStatus_FullMethodName = "/gitlab_com.gitlab_runner.runner_wrapper.ProcessWrapper/CheckStatus" ProcessWrapper_InitGracefulShutdown_FullMethodName = "/gitlab_com.gitlab_runner.runner_wrapper.ProcessWrapper/InitGracefulShutdown" ProcessWrapper_InitForcefulShutdown_FullMethodName = "/gitlab_com.gitlab_runner.runner_wrapper.ProcessWrapper/InitForcefulShutdown" ) // ProcessWrapperClient is the client API for ProcessWrapper 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 ProcessWrapperClient interface { CheckStatus(ctx context.Context, in *CheckStatusRequest, opts ...grpc.CallOption) (*CheckStatusResponse, error) InitGracefulShutdown(ctx context.Context, in *InitGracefulShutdownRequest, opts ...grpc.CallOption) (*InitGracefulShutdownResponse, error) InitForcefulShutdown(ctx context.Context, in *InitForcefulShutdownRequest, opts ...grpc.CallOption) (*InitForcefulShutdownResponse, error) } type processWrapperClient struct { cc grpc.ClientConnInterface } func NewProcessWrapperClient(cc grpc.ClientConnInterface) ProcessWrapperClient { return &processWrapperClient{cc} } func (c *processWrapperClient) CheckStatus(ctx context.Context, in *CheckStatusRequest, opts ...grpc.CallOption) (*CheckStatusResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CheckStatusResponse) err := c.cc.Invoke(ctx, ProcessWrapper_CheckStatus_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *processWrapperClient) InitGracefulShutdown(ctx context.Context, in *InitGracefulShutdownRequest, opts ...grpc.CallOption) (*InitGracefulShutdownResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(InitGracefulShutdownResponse) err := c.cc.Invoke(ctx, ProcessWrapper_InitGracefulShutdown_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *processWrapperClient) InitForcefulShutdown(ctx context.Context, in *InitForcefulShutdownRequest, opts ...grpc.CallOption) (*InitForcefulShutdownResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(InitForcefulShutdownResponse) err := c.cc.Invoke(ctx, ProcessWrapper_InitForcefulShutdown_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // ProcessWrapperServer is the server API for ProcessWrapper service. // All implementations must embed UnimplementedProcessWrapperServer // for forward compatibility. type ProcessWrapperServer interface { CheckStatus(context.Context, *CheckStatusRequest) (*CheckStatusResponse, error) InitGracefulShutdown(context.Context, *InitGracefulShutdownRequest) (*InitGracefulShutdownResponse, error) InitForcefulShutdown(context.Context, *InitForcefulShutdownRequest) (*InitForcefulShutdownResponse, error) mustEmbedUnimplementedProcessWrapperServer() } // UnimplementedProcessWrapperServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedProcessWrapperServer struct{} func (UnimplementedProcessWrapperServer) CheckStatus(context.Context, *CheckStatusRequest) (*CheckStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckStatus not implemented") } func (UnimplementedProcessWrapperServer) InitGracefulShutdown(context.Context, *InitGracefulShutdownRequest) (*InitGracefulShutdownResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InitGracefulShutdown not implemented") } func (UnimplementedProcessWrapperServer) InitForcefulShutdown(context.Context, *InitForcefulShutdownRequest) (*InitForcefulShutdownResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InitForcefulShutdown not implemented") } func (UnimplementedProcessWrapperServer) mustEmbedUnimplementedProcessWrapperServer() {} func (UnimplementedProcessWrapperServer) testEmbeddedByValue() {} // UnsafeProcessWrapperServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ProcessWrapperServer will // result in compilation errors. type UnsafeProcessWrapperServer interface { mustEmbedUnimplementedProcessWrapperServer() } func RegisterProcessWrapperServer(s grpc.ServiceRegistrar, srv ProcessWrapperServer) { // If the following call pancis, it indicates UnimplementedProcessWrapperServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&ProcessWrapper_ServiceDesc, srv) } func _ProcessWrapper_CheckStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CheckStatusRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProcessWrapperServer).CheckStatus(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ProcessWrapper_CheckStatus_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProcessWrapperServer).CheckStatus(ctx, req.(*CheckStatusRequest)) } return interceptor(ctx, in, info, handler) } func _ProcessWrapper_InitGracefulShutdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(InitGracefulShutdownRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProcessWrapperServer).InitGracefulShutdown(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ProcessWrapper_InitGracefulShutdown_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProcessWrapperServer).InitGracefulShutdown(ctx, req.(*InitGracefulShutdownRequest)) } return interceptor(ctx, in, info, handler) } func _ProcessWrapper_InitForcefulShutdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(InitForcefulShutdownRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProcessWrapperServer).InitForcefulShutdown(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ProcessWrapper_InitForcefulShutdown_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProcessWrapperServer).InitForcefulShutdown(ctx, req.(*InitForcefulShutdownRequest)) } return interceptor(ctx, in, info, handler) } // ProcessWrapper_ServiceDesc is the grpc.ServiceDesc for ProcessWrapper service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var ProcessWrapper_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gitlab_com.gitlab_runner.runner_wrapper.ProcessWrapper", HandlerType: (*ProcessWrapperServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CheckStatus", Handler: _ProcessWrapper_CheckStatus_Handler, }, { MethodName: "InitGracefulShutdown", Handler: _ProcessWrapper_InitGracefulShutdown_Handler, }, { MethodName: "InitForcefulShutdown", Handler: _ProcessWrapper_InitForcefulShutdown_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/wrapper.proto", }