Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Allocator ¶
type Allocator []*node
Allocator is defined as an array of nodes and implements a buddy allocator.
func NewAllocatorByNodeCnt ¶
func NewAllocatorBySize ¶
type DiskRpc ¶
type DiskRpc interface { // Register a handler for the given channel. Use a nil handler to unregister // a target. Register(channel Channel, handler interface{}) error // Handle incoming and outgoing messages. Handle(ctx context.Context) error // Execute an RPC call. Invoke(ctx context.Context, nodeID MailBoxID, targetID Channel, method string, req proto.Message, res proto.Message) error }
DiskRpc implements a synchronous RPC mechanism.
func NewDiskRpc ¶
type MailBox ¶
type MailBox interface { // Retrieve the local mailbox id. LocalID() MailBoxID // Receive messages from the mail box. // // This call will block until there is something to read. Recv() ([]*Message, error) // Send a message. Send(msg *Message) error }
A MailBox is an interface that allows unicast message communication.
Click to show internal directories.
Click to hide internal directories.