rpc

package
v0.0.0-...-d23c3ed Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoordinatorSock

func CoordinatorSock() string

Types

type DoneTaskArgs

type DoneTaskArgs struct {
	TaskID int
}

type DoneTaskReply

type DoneTaskReply struct {
}

type GetTaskArgs

type GetTaskArgs struct {
}

type GetTaskReply

type GetTaskReply struct {
	TaskID     int
	NReduce    int
	Filename   string
	Assignment byte
}

type RPCClient

type RPCClient struct {
	// contains filtered or unexported fields
}

func NewRPCClient

func NewRPCClient(addr, network string) *RPCClient

func (*RPCClient) DoneTask

func (s *RPCClient) DoneTask(taskID int) error

func (*RPCClient) GetTask

func (s *RPCClient) GetTask() (*mr.Task, error)

type RPCServer

type RPCServer struct {
	// contains filtered or unexported fields
}

func NewRPCServer

func NewRPCServer(
	addr, network string,
	coordinator mr.Coordinatorer,
) *RPCServer

func (*RPCServer) DoneTask

func (s *RPCServer) DoneTask(args *DoneTaskArgs, reply *DoneTaskReply) error

func (*RPCServer) GetTask

func (s *RPCServer) GetTask(args *GetTaskArgs, reply *GetTaskReply) error

func (*RPCServer) ListenAndServe

func (s *RPCServer) ListenAndServe(ctx context.Context) error

Jump to

Keyboard shortcuts

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