communication

package
v0.0.0-...-f617e85 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2016 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockMessage

type BlockMessage struct {
	Data     []byte
	Checksum string
}

type HeartbeatMessage

type HeartbeatMessage struct {
	NodeID      NodeID
	Addr        string
	Blocks      []BlockID
	Utilization int64
	Timestamp   time.Time
}

HeartbeatMessage is the heartbeat packet send to master, which includes node's metric. TODO add metric

type HeartbeatResponse

type HeartbeatResponse struct {
	DeadBlocks []BlockID
	SyncBlocks []*SyncBlock
}

HeartbeatResponse send from master to chunk node to do some action to keep consistency of cluster.

type RPCClient

type RPCClient struct {
	Connection *rpc.Client
}

func NewRPClient

func NewRPClient(dsn string, timeout time.Duration) (*RPCClient, error)

type RegistrationMessage

type RegistrationMessage struct {
	Addr string
}

RegistrationMessage is the first message send to master which includes chunk node's address information.

type SyncDoneResponse

type SyncDoneResponse struct {
}

Jump to

Keyboard shortcuts

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