blockstoreutil

package
v0.0.0-...-9ab2669 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

此源码被清华学神尹成大魔王专业翻译分析并修改 尹成QQ77025077 尹成微信18510341407 尹成所在QQ群721929980 尹成邮箱 yinc13@mails.tsinghua.edu.cn 尹成毕业于清华大学,微软区块链领域全球最有价值专家 https://mvp.microsoft.com/zh-cn/PublicProfile/4033620 package blockstoreutil为blockstores提供实用程序功能。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterPinned

func FilterPinned(pins pin.Pinner, out chan<- interface{}, cids []cid.Cid) []cid.Cid

filterpinned获取一个CID切片并将其与pinned CID一起返回 远离的。如果固定了一个cid,它将在给定的 输出通道,错误指示CID已固定。 此函数在RMBLOCK中用于筛选任何未 移除(因为它们是固定的)。

func ProcRmOutput

func ProcRmOutput(next func() (interface{}, error), sout io.Writer, serr io.Writer) error

procroutput接受一个函数,如果没有输入,则返回来自人民币锁或eof的结果。 然后,它根据从函数返回的removedBlock对象写入stdout/stderr。

func RmBlocks

func RmBlocks(blocks bs.GCBlockstore, pins pin.Pinner, cids []cid.Cid, opts RmBlocksOpts) (<-chan interface{}, error)

人民币锁可以移除CIDS切片中提供的块。 当 不使用安静选项。块移除是异步的,将 跳过任何固定块。

Types

type RemovedBlock

type RemovedBlock struct {
	Hash  string `json:",omitempty"`
	Error string `json:",omitempty"`
}

REMOVEDBLOCK用于重新显示删除块的结果。 如果成功删除块,则错误字符串将 空的。如果无法删除块,则错误将包含 无法删除块的原因。如果删除被中止 由于致命错误,哈希将为空,错误将包含 原因,将不再发送结果。

type RmBlocksOpts

type RmBlocksOpts struct {
	Prefix string
	Quiet  bool
	Force  bool
}

RMBlocksOpts用于包装RMBlocks()的选项。

Jump to

Keyboard shortcuts

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