Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*PeerstoreManager) error
Option 定义配置选项函数类型
type PeerstoreManager ¶
type PeerstoreManager struct {
// contains filtered or unexported fields
}
PeerstoreManager 对等节点存储管理器结构体
func NewPeerstoreManager ¶
func NewPeerstoreManager(pstore peerstore.Peerstore, eventBus event.Bus, network network.Network, opts ...Option) (*PeerstoreManager, error)
NewPeerstoreManager 创建新的对等节点存储管理器 参数:
- pstore: 对等节点存储
- eventBus: 事件总线
- network: 网络接口
- opts: 配置选项
返回:
- *PeerstoreManager: 管理器实例
- error: 错误信息
func (*PeerstoreManager) Close ¶
func (m *PeerstoreManager) Close() error
Close 关闭对等节点存储管理器 返回:
- error: 错误信息
Click to show internal directories.
Click to hide internal directories.