Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { // subscribe to chunk to be push synced - iterates from earliest to newest SubscribePush(context.Context) (<-chan storage.Chunk, func()) // called to set a chunk as synced - and allow it to be garbage collected // TODO this should take ... last argument to delete many in one batch Set(context.Context, chunk.ModeSet, ...storage.Address) error }
DB interface implemented by localstore
type PubSub ¶
type PubSub interface { Register(topic string, prox bool, handler func(msg []byte, p *p2p.Peer) error) func() Send(to []byte, topic string, msg []byte) error BaseAddr() []byte IsClosestTo([]byte) bool }
PubSub is a Postal Service interface needed to send/receive chunks and receipts for push syncing
type Pusher ¶
type Pusher struct {
// contains filtered or unexported fields
}
Pusher takes care of the push syncing
type Storer ¶
type Storer struct {
// contains filtered or unexported fields
}
Storer is the object used by the push-sync server side protocol
func NewStorer ¶
NewStorer constructs a Storer Storer runs on storer nodes to handle the reception of push-synced chunks that fall within their area of responsibility. The protocol makes sure that - the chunks are stored and synced to their nearest neighbours and - a statement of custody receipt is sent as a response to the originator it sets a cancel function that deregisters the handler
Click to show internal directories.
Click to hide internal directories.