Help us shape the future of Go! Take the 2026 Go Developer Survey

pipestore

package module
v0.0.0-...-f6c1d30 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

README

pipestore

GoDoc CI

Package pipestore implements the blob.Store interface via Chirp v0 over a pair of pipes.

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

func PipeFromDescriptors(rfd, wfd uintptr) (r, w *os.File)

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

func NewService(st blob.Store) Service

NewService constructs a new unstarted Service that delegates to st.

func (Service) Start

func (s Service) Start(peer *chirp.Peer) (r, w *os.File, _ error)

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.

Jump to

Keyboard shortcuts

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