Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addr ¶
type Addr interface {
// Return a unique identifier (aka. address) for this process
ID() ProcessID
// Return the ProcessInbox type for this process
Type() ProcessType
}
func NewAddress ¶
func NewAddress(id ProcessID, pt ProcessType) Addr
type Message ¶
type Message interface {
// The source Address of this message
Src() Addr
}
Message - interface intended to be implemented by every message exchanged between Paxos Processes
type MessageExchange ¶
type MessageExchange interface {
// Send a message to this specific Paxos process identified by its ProcessID
Send(dest Addr, m Message) error
// Broadcast a message all Paxos process of a specified type
SendAll(pt ProcessType, m Message) error
// Register a process with this exchange
Register(p ProcessInbox) error
// UnRegister a process with this exchange
UnRegister(p ProcessInbox) error
}
MessageExchange - Facilitates message exchanges between Paxos processes.
func NewMessageExchange ¶
func NewMessageExchange() MessageExchange
type Process ¶
type Process interface {
ProcessInbox
ProcessOutbox
GetAddr() Addr
}
Process - interface allowing a runnable entity with message I/O
func NewProcess ¶
func NewProcess(id ProcessID, pt ProcessType) Process
type ProcessInbox ¶
type ProcessInbox interface {
// Address of the inbox
Addr
// Send a message to this process
Send(m Message) error
}
ProcessInbox - interface allowing a Paxos process to be addressed & sent messages
type ProcessOutbox ¶
ProcessOutbox - interface allowing a process to recv messages
type ProcessType ¶
type ProcessType int
ProcessType - The different paxos process types
const ( Acceptor ProcessType = iota Commander Leader Replica Scout Client )
func (ProcessType) String ¶
func (pt ProcessType) String() string
stringer implementation for ProcessType
Click to show internal directories.
Click to hide internal directories.