Documentation
¶
Overview ¶
Package pipestore implements an interface to a blob.Store that communicates via Chirp v0 (using chirpstore) over a pair of pipes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStore ¶
func NewStore(rf, wf *os.File) blob.StoreCloser
NewStore constructs a new blob.StoreCloser that communicates over the specified pipes. The concrete type of the result is chirpstore.Store.
func PipeFromDescriptors ¶
PipeFromDescriptors returns a pair of pipes from the specified file descriptors. The caller is expected to read from rfd (via r) and write to wfd (via w).
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
A Service wraps an underlying blob.Store to export its methods as a Chirp v0 service over a pair of pipes.
func NewService ¶
NewService constructs a new unstarted Service that delegates to st.
func (Service) Start ¶
Start installs the service on the given unstarted peer, starts the peer, and returns a pair of pipes connected to it.
The Service is safe for concurrent use by multiple peers, as long as each peer is not already running at the time of the call to Start. The caller is responsible for waiting for the peer to complete, if necessary.