// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v5.27.3
// source: worker_proto/worker.proto

package worker_proto

import (
	context 
	grpc 
	codes 
	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 (
	WorkerService_Start_FullMethodName     = "/worker.WorkerService/Start"
	WorkerService_CallOp_FullMethodName    = "/worker.WorkerService/CallOp"
	WorkerService_Subscribe_FullMethodName = "/worker.WorkerService/Subscribe"
	WorkerService_GetValue_FullMethodName  = "/worker.WorkerService/GetValue"
)

// WorkerServiceClient is the client API for WorkerService 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 WorkerServiceClient interface {
	Start(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	CallOp(ctx context.Context, in *CallOpRequest, opts ...grpc.CallOption) (*CallOpResponse, error)
	Subscribe(ctx context.Context, in *Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Empty], error)
	GetValue(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetValueResponse, error)
}

type workerServiceClient struct {
	cc grpc.ClientConnInterface
}

func ( grpc.ClientConnInterface) WorkerServiceClient {
	return &workerServiceClient{}
}

func ( *workerServiceClient) ( context.Context,  *Empty,  ...grpc.CallOption) (*Empty, error) {
	 := append([]grpc.CallOption{grpc.StaticMethod()}, ...)
	 := new(Empty)
	 := .cc.Invoke(, WorkerService_Start_FullMethodName, , , ...)
	if  != nil {
		return nil, 
	}
	return , nil
}

func ( *workerServiceClient) ( context.Context,  *CallOpRequest,  ...grpc.CallOption) (*CallOpResponse, error) {
	 := append([]grpc.CallOption{grpc.StaticMethod()}, ...)
	 := new(CallOpResponse)
	 := .cc.Invoke(, WorkerService_CallOp_FullMethodName, , , ...)
	if  != nil {
		return nil, 
	}
	return , nil
}

func ( *workerServiceClient) ( context.Context,  *Empty,  ...grpc.CallOption) (grpc.ServerStreamingClient[Empty], error) {
	 := append([]grpc.CallOption{grpc.StaticMethod()}, ...)
	,  := .cc.NewStream(, &WorkerService_ServiceDesc.Streams[0], WorkerService_Subscribe_FullMethodName, ...)
	if  != nil {
		return nil, 
	}
	 := &grpc.GenericClientStream[Empty, Empty]{ClientStream: }
	if  := .ClientStream.SendMsg();  != nil {
		return nil, 
	}
	if  := .ClientStream.CloseSend();  != nil {
		return nil, 
	}
	return , nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type WorkerService_SubscribeClient = grpc.ServerStreamingClient[Empty]

func ( *workerServiceClient) ( context.Context,  *Empty,  ...grpc.CallOption) (*GetValueResponse, error) {
	 := append([]grpc.CallOption{grpc.StaticMethod()}, ...)
	 := new(GetValueResponse)
	 := .cc.Invoke(, WorkerService_GetValue_FullMethodName, , , ...)
	if  != nil {
		return nil, 
	}
	return , nil
}

// WorkerServiceServer is the server API for WorkerService service.
// All implementations must embed UnimplementedWorkerServiceServer
// for forward compatibility.
type WorkerServiceServer interface {
	Start(context.Context, *Empty) (*Empty, error)
	CallOp(context.Context, *CallOpRequest) (*CallOpResponse, error)
	Subscribe(*Empty, grpc.ServerStreamingServer[Empty]) error
	GetValue(context.Context, *Empty) (*GetValueResponse, error)
	mustEmbedUnimplementedWorkerServiceServer()
}

// UnimplementedWorkerServiceServer 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 UnimplementedWorkerServiceServer struct{}

func (UnimplementedWorkerServiceServer) (context.Context, *Empty) (*Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Start not implemented")
}
func (UnimplementedWorkerServiceServer) (context.Context, *CallOpRequest) (*CallOpResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CallOp not implemented")
}
func (UnimplementedWorkerServiceServer) (*Empty, grpc.ServerStreamingServer[Empty]) error {
	return status.Errorf(codes.Unimplemented, "method Subscribe not implemented")
}
func (UnimplementedWorkerServiceServer) (context.Context, *Empty) (*GetValueResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetValue not implemented")
}
func (UnimplementedWorkerServiceServer) () {}
func (UnimplementedWorkerServiceServer) ()                       {}

// UnsafeWorkerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WorkerServiceServer will
// result in compilation errors.
type UnsafeWorkerServiceServer interface {
	mustEmbedUnimplementedWorkerServiceServer()
}

func ( grpc.ServiceRegistrar,  WorkerServiceServer) {
	// If the following call pancis, it indicates UnimplementedWorkerServiceServer 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 ,  := .(interface{ () });  {
		.()
	}
	.RegisterService(&WorkerService_ServiceDesc, )
}

func _WorkerService_Start_Handler( interface{},  context.Context,  func(interface{}) error,  grpc.UnaryServerInterceptor) (interface{}, error) {
	 := new(Empty)
	if  := ();  != nil {
		return nil, 
	}
	if  == nil {
		return .(WorkerServiceServer).Start(, )
	}
	 := &grpc.UnaryServerInfo{
		Server:     ,
		FullMethod: WorkerService_Start_FullMethodName,
	}
	 := func( context.Context,  interface{}) (interface{}, error) {
		return .(WorkerServiceServer).Start(, .(*Empty))
	}
	return (, , , )
}

func _WorkerService_CallOp_Handler( interface{},  context.Context,  func(interface{}) error,  grpc.UnaryServerInterceptor) (interface{}, error) {
	 := new(CallOpRequest)
	if  := ();  != nil {
		return nil, 
	}
	if  == nil {
		return .(WorkerServiceServer).CallOp(, )
	}
	 := &grpc.UnaryServerInfo{
		Server:     ,
		FullMethod: WorkerService_CallOp_FullMethodName,
	}
	 := func( context.Context,  interface{}) (interface{}, error) {
		return .(WorkerServiceServer).CallOp(, .(*CallOpRequest))
	}
	return (, , , )
}

func _WorkerService_Subscribe_Handler( interface{},  grpc.ServerStream) error {
	 := new(Empty)
	if  := .RecvMsg();  != nil {
		return 
	}
	return .(WorkerServiceServer).Subscribe(, &grpc.GenericServerStream[Empty, Empty]{ServerStream: })
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type WorkerService_SubscribeServer = grpc.ServerStreamingServer[Empty]

func _WorkerService_GetValue_Handler( interface{},  context.Context,  func(interface{}) error,  grpc.UnaryServerInterceptor) (interface{}, error) {
	 := new(Empty)
	if  := ();  != nil {
		return nil, 
	}
	if  == nil {
		return .(WorkerServiceServer).GetValue(, )
	}
	 := &grpc.UnaryServerInfo{
		Server:     ,
		FullMethod: WorkerService_GetValue_FullMethodName,
	}
	 := func( context.Context,  interface{}) (interface{}, error) {
		return .(WorkerServiceServer).GetValue(, .(*Empty))
	}
	return (, , , )
}

// WorkerService_ServiceDesc is the grpc.ServiceDesc for WorkerService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var WorkerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "worker.WorkerService",
	HandlerType: (*WorkerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Start",
			Handler:    _WorkerService_Start_Handler,
		},
		{
			MethodName: "CallOp",
			Handler:    _WorkerService_CallOp_Handler,
		},
		{
			MethodName: "GetValue",
			Handler:    _WorkerService_GetValue_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _WorkerService_Subscribe_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "worker_proto/worker.proto",
}