pb

package
v0.0.0-...-f737b9d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_coordinator_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "coordinator.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateMapTask",
			Handler:    _Service_CreateMapTask_Handler,
		},
		{
			MethodName: "CreateReduceTask",
			Handler:    _Service_CreateReduceTask_Handler,
		},
		{
			MethodName: "GetMapTask",
			Handler:    _Service_GetMapTask_Handler,
		},
		{
			MethodName: "GetReduceTask",
			Handler:    _Service_GetReduceTask_Handler,
		},
		{
			MethodName: "ReportMapTaskResult",
			Handler:    _Service_ReportMapTaskResult_Handler,
		},
		{
			MethodName: "ReportReduceTaskResult",
			Handler:    _Service_ReportReduceTaskResult_Handler,
		},
		{
			MethodName: "FlushCreatedTasksToWorkers",
			Handler:    _Service_FlushCreatedTasksToWorkers_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "coordinator.proto",
}

Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type MapTask

type MapTask struct {

	// id - id of the MapTask
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// input_file - input file for MapTask
	InputFile string `protobuf:"bytes,2,opt,name=input_file,json=inputFile,proto3" json:"input_file,omitempty"`
	// contains filtered or unexported fields
}

MapTask - message representing MapTask

func (*MapTask) Descriptor deprecated

func (*MapTask) Descriptor() ([]byte, []int)

Deprecated: Use MapTask.ProtoReflect.Descriptor instead.

func (*MapTask) GetId

func (x *MapTask) GetId() string

func (*MapTask) GetInputFile

func (x *MapTask) GetInputFile() string

func (*MapTask) ProtoMessage

func (*MapTask) ProtoMessage()

func (*MapTask) ProtoReflect

func (x *MapTask) ProtoReflect() protoreflect.Message

func (*MapTask) Reset

func (x *MapTask) Reset()

func (*MapTask) String

func (x *MapTask) String() string

type MapTaskResult

type MapTaskResult struct {

	// task_id - id of the MapTask
	TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	// output_files - intermediate results of the MapTask
	OutputFiles []string `protobuf:"bytes,2,rep,name=output_files,json=outputFiles,proto3" json:"output_files,omitempty"`
	// error - error that have occurred during execution of the MapTask by a Worker
	Error *string `protobuf:"bytes,3,opt,name=error,proto3,oneof" json:"error,omitempty"`
	// contains filtered or unexported fields
}

MapTaskResult - result of MapTask execution returned by a Worker

func (*MapTaskResult) Descriptor deprecated

func (*MapTaskResult) Descriptor() ([]byte, []int)

Deprecated: Use MapTaskResult.ProtoReflect.Descriptor instead.

func (*MapTaskResult) GetError

func (x *MapTaskResult) GetError() string

func (*MapTaskResult) GetOutputFiles

func (x *MapTaskResult) GetOutputFiles() []string

func (*MapTaskResult) GetTaskId

func (x *MapTaskResult) GetTaskId() string

func (*MapTaskResult) ProtoMessage

func (*MapTaskResult) ProtoMessage()

func (*MapTaskResult) ProtoReflect

func (x *MapTaskResult) ProtoReflect() protoreflect.Message

func (*MapTaskResult) Reset

func (x *MapTaskResult) Reset()

func (*MapTaskResult) String

func (x *MapTaskResult) String() string

type NewMapTask

type NewMapTask struct {

	// input_file - input file for MapTask
	InputFile string `protobuf:"bytes,1,opt,name=input_file,json=inputFile,proto3" json:"input_file,omitempty"`
	// contains filtered or unexported fields
}

NewMapTask - message to create new MapTask

func (*NewMapTask) Descriptor deprecated

func (*NewMapTask) Descriptor() ([]byte, []int)

Deprecated: Use NewMapTask.ProtoReflect.Descriptor instead.

func (*NewMapTask) GetInputFile

func (x *NewMapTask) GetInputFile() string

func (*NewMapTask) ProtoMessage

func (*NewMapTask) ProtoMessage()

func (*NewMapTask) ProtoReflect

func (x *NewMapTask) ProtoReflect() protoreflect.Message

func (*NewMapTask) Reset

func (x *NewMapTask) Reset()

func (*NewMapTask) String

func (x *NewMapTask) String() string

type NewReduceTask

type NewReduceTask struct {

	// input_files - input files for ReduceTask
	InputFiles []string `protobuf:"bytes,1,rep,name=input_files,json=inputFiles,proto3" json:"input_files,omitempty"`
	// contains filtered or unexported fields
}

NewReduceTask - message to create new ReduceTask

func (*NewReduceTask) Descriptor deprecated

func (*NewReduceTask) Descriptor() ([]byte, []int)

Deprecated: Use NewReduceTask.ProtoReflect.Descriptor instead.

func (*NewReduceTask) GetInputFiles

func (x *NewReduceTask) GetInputFiles() []string

func (*NewReduceTask) ProtoMessage

func (*NewReduceTask) ProtoMessage()

func (*NewReduceTask) ProtoReflect

func (x *NewReduceTask) ProtoReflect() protoreflect.Message

func (*NewReduceTask) Reset

func (x *NewReduceTask) Reset()

func (*NewReduceTask) String

func (x *NewReduceTask) String() string

type ReduceTask

type ReduceTask struct {

	// id - id of the ReduceTask
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// input_files - input files for ReduceTask
	InputFiles []string `protobuf:"bytes,2,rep,name=input_files,json=inputFiles,proto3" json:"input_files,omitempty"`
	// contains filtered or unexported fields
}

ReduceTask - message representing ReduceTask

func (*ReduceTask) Descriptor deprecated

func (*ReduceTask) Descriptor() ([]byte, []int)

Deprecated: Use ReduceTask.ProtoReflect.Descriptor instead.

func (*ReduceTask) GetId

func (x *ReduceTask) GetId() string

func (*ReduceTask) GetInputFiles

func (x *ReduceTask) GetInputFiles() []string

func (*ReduceTask) ProtoMessage

func (*ReduceTask) ProtoMessage()

func (*ReduceTask) ProtoReflect

func (x *ReduceTask) ProtoReflect() protoreflect.Message

func (*ReduceTask) Reset

func (x *ReduceTask) Reset()

func (*ReduceTask) String

func (x *ReduceTask) String() string

type ReduceTaskResult

type ReduceTaskResult struct {

	// task_id - id of the ReduceTask
	TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	// output_file - result of the ReduceTask
	OutputFile string `protobuf:"bytes,2,opt,name=output_file,json=outputFile,proto3" json:"output_file,omitempty"`
	// error - error that have occurred during execution of the ReduceTask by a Worker
	Error *string `protobuf:"bytes,3,opt,name=error,proto3,oneof" json:"error,omitempty"`
	// contains filtered or unexported fields
}

ReduceTaskResult - result of ReduceTask execution returned by a Worker

func (*ReduceTaskResult) Descriptor deprecated

func (*ReduceTaskResult) Descriptor() ([]byte, []int)

Deprecated: Use ReduceTaskResult.ProtoReflect.Descriptor instead.

func (*ReduceTaskResult) GetError

func (x *ReduceTaskResult) GetError() string

func (*ReduceTaskResult) GetOutputFile

func (x *ReduceTaskResult) GetOutputFile() string

func (*ReduceTaskResult) GetTaskId

func (x *ReduceTaskResult) GetTaskId() string

func (*ReduceTaskResult) ProtoMessage

func (*ReduceTaskResult) ProtoMessage()

func (*ReduceTaskResult) ProtoReflect

func (x *ReduceTaskResult) ProtoReflect() protoreflect.Message

func (*ReduceTaskResult) Reset

func (x *ReduceTaskResult) Reset()

func (*ReduceTaskResult) String

func (x *ReduceTaskResult) String() string

type ServiceClient

type ServiceClient interface {
	// CreateMapTask - create new MapTask
	CreateMapTask(ctx context.Context, in *NewMapTask, opts ...grpc.CallOption) (*MapTask, error)
	// CreateReduceTask - create new ReduceTask
	CreateReduceTask(ctx context.Context, in *NewReduceTask, opts ...grpc.CallOption) (*ReduceTask, error)
	// GetMapTask - get MapTask for processing
	GetMapTask(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*MapTask, error)
	// GetReduceTask - get ReduceTask for processing
	GetReduceTask(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ReduceTask, error)
	// ReportMapTaskResult - report result of MapTask execution
	ReportMapTaskResult(ctx context.Context, in *MapTaskResult, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// ReportReduceTaskResult - report result of ReduceTask execution
	ReportReduceTaskResult(ctx context.Context, in *ReduceTaskResult, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// FlushCreatedTasksToWorkers - send created tasks to workers, useful if some or all of the workers died / failed
	FlushCreatedTasksToWorkers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

ServiceClient is the client API for Service 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.

func NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	// CreateMapTask - create new MapTask
	CreateMapTask(context.Context, *NewMapTask) (*MapTask, error)
	// CreateReduceTask - create new ReduceTask
	CreateReduceTask(context.Context, *NewReduceTask) (*ReduceTask, error)
	// GetMapTask - get MapTask for processing
	GetMapTask(context.Context, *emptypb.Empty) (*MapTask, error)
	// GetReduceTask - get ReduceTask for processing
	GetReduceTask(context.Context, *emptypb.Empty) (*ReduceTask, error)
	// ReportMapTaskResult - report result of MapTask execution
	ReportMapTaskResult(context.Context, *MapTaskResult) (*emptypb.Empty, error)
	// ReportReduceTaskResult - report result of ReduceTask execution
	ReportReduceTaskResult(context.Context, *ReduceTaskResult) (*emptypb.Empty, error)
	// FlushCreatedTasksToWorkers - send created tasks to workers, useful if some or all of the workers died / failed
	FlushCreatedTasksToWorkers(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) CreateMapTask

func (UnimplementedServiceServer) CreateReduceTask

func (UnimplementedServiceServer) FlushCreatedTasksToWorkers

func (UnimplementedServiceServer) FlushCreatedTasksToWorkers(context.Context, *emptypb.Empty) (*emptypb.Empty, error)

func (UnimplementedServiceServer) GetMapTask

func (UnimplementedServiceServer) GetReduceTask

func (UnimplementedServiceServer) ReportMapTaskResult

func (UnimplementedServiceServer) ReportReduceTaskResult

type UnsafeServiceServer

type UnsafeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL