defs

package module
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 14 Imported by: 0

README

flow diagram

DeFS

Go Reference Go

DeFS(Decentralized file service) 去中心化文件服务,引领了数据存储领域的革新,通过引入动态存储技术,解决了传统静态存储和去中心化存储所面临的挑战。其核心设计理念是为用户提供更加高效、安全且可靠的数据存储解决方案。通过数据的自由流动和动态迁移,在去中心化的同时,又保障了数据的安全性和可靠性。

该项目目前正在积极开发中,处于 Alpha 状态。

文档

该文档正在编写中……

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS struct {
	// contains filtered or unexported fields
}

FS 提供了与DeFS交互所需的各种函数

func Open

func Open(opt *opts.Options, p2p *dep2p.DeP2P, pubsub *pubsub.DeP2PPubSub) (*FS, error)

Open 返回一个新的文件存储对象

func (*FS) Cache

func (fs *FS) Cache() *ristretto.Cache

Cache 获取缓存实例

func (*FS) Ctx

func (fs *FS) Ctx() context.Context

Ctx 获取全局上下文

func (*FS) DB

func (fs *FS) DB() *sqlites.SqliteDB

DB 获取sqlite数据库服务

func (*FS) DownloadChan

func (fs *FS) DownloadChan() chan *core.DownloadChan

DownloadChan 获取用于刷新下载的通道

func (*FS) Opt

func (fs *FS) Opt() *opts.Options

Opt 获取文件存储选项配置

func (*FS) P2P

func (fs *FS) P2P() *dep2p.DeP2P

P2P 获取DeP2P网络主机

func (*FS) Pool

func (fs *FS) Pool() *pool.MemoryPool

Pool 获取内存池

func (*FS) Pubsub

func (fs *FS) Pubsub() *pubsub.DeP2PPubSub

Pubsub 获取DeP2P网络订阅

func (*FS) Registry

func (fs *FS) Registry() *eventbus.EventRegistry

Registry 获取事件总线

func (*FS) SearchChan

func (fs *FS) SearchChan() chan *core.SearchChan

SearchChan 用于刷新搜索的通道

func (*FS) StorageChan added in v0.0.9

func (fs *FS) StorageChan() chan *core.StorageChan

StorageChan 获取用于存储奖励的通知

func (*FS) UploadChan

func (fs *FS) UploadChan() chan *core.UploadChan

UploadChan 获取用于刷新上传的通道

Directories

Path Synopsis
定义共享的基类和方法
定义共享的基类和方法
mem
tarfs
package tarfs implements a read-only in-memory representation of a tar archive
package tarfs implements a read-only in-memory representation of a tar archive
Package fsnotify provides a cross-platform interface for file system notifications.
Package fsnotify provides a cross-platform interface for file system notifications.
internal
Package internal contains some helpers.
Package internal contains some helpers.
Ristretto is a fast, fixed size, in-memory cache with a dual focus on throughput and hit ratio performance.
Ristretto is a fast, fixed size, in-memory cache with a dual focus on throughput and hit ratio performance.
sim
z
AST: 语法树
AST: 语法树

Jump to

Keyboard shortcuts

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