rpc

package
v0.0.0-...-e147593 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbortReduceTaskArgs

type AbortReduceTaskArgs struct{}

type AbortReduceTaskReply

type AbortReduceTaskReply struct{}

type DefaultRpcGateway

type DefaultRpcGateway struct {
}

func (DefaultRpcGateway) Call

func (rpcGateway DefaultRpcGateway) Call(
	address string,
	methodName string,
	args any,
	reply any,
) error

type GetHeartBeatArgs

type GetHeartBeatArgs struct{}

type GetHeartBeatReply

type GetHeartBeatReply struct {
	MapTask    *MapTaskState
	ReduceTask *ReduceTaskState
}

type IntermediateFile

type IntermediateFile struct {
	Location    string
	Partition   uint16
	SizeInBytes uint64
}

type MapTaskState

type MapTaskState struct {
	Id                uint16
	Status            TaskStatus
	IntermediateFiles []IntermediateFile
}

type ReduceTaskState

type ReduceTaskState struct {
	Id                 uint16
	Status             TaskStatus
	PartitionNumber    uint16
	OutputFileLocation string
}

type RpcGateway

type RpcGateway interface {
	Call(address string, methodName string, args any, reply any) error
}

type StartMapTaskArgs

type StartMapTaskArgs struct {
	Id                     uint16
	InputFileSplitLocation string
}

type StartMapTaskReply

type StartMapTaskReply struct{}

type StartReduceTaskArgs

type StartReduceTaskArgs struct {
	Id                uint16
	IntermediateFiles []IntermediateFile
}

type StartReduceTaskReply

type StartReduceTaskReply struct{}

type TaskStatus

type TaskStatus uint8
const (
	Idle       TaskStatus = 0
	InProgress TaskStatus = 1
	Completed  TaskStatus = 2
)

Jump to

Keyboard shortcuts

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