Documentation ¶
Index ¶
Constants ¶
View Source
const ( CidLength = 36 ZeroPeersTimeout = 2 * time.Minute )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy interface { Add(data []byte, pin bool) (cid.Cid, error) Get(key []byte, dataType DataType) ([]byte, error) LoadTo(key []byte, to io.Writer, ctx context.Context, onLoading func(size, loaded int64)) error Pin(key []byte) error Unpin(key []byte) error Cid(data []byte) (cid.Cid, error) Port() int PeerId() string AddFile(absPath string, data io.ReadCloser, fi os.FileInfo) (cid.Cid, error) Host() core2.Host ShouldPin(dataType DataType) bool GetWithSizeLimit(key []byte, dataType DataType, size int64) ([]byte, error) PubSub() *pubsub.PubSub GC() (ctx context.Context, cancel context.CancelFunc) }
func NewIpfsProxy ¶
func NewMemoryIpfsProxy ¶
func NewMemoryIpfsProxy() Proxy
Click to show internal directories.
Click to hide internal directories.