Documentation ¶
Index ¶
- func RegisterEventProtocol(lc fx.Lifecycle, input RegisterEventProtocolInput) error
- func RegisterPubsubProtocol(lc fx.Lifecycle, input RegisterPubsubProtocolInput)
- func RegisterStreamProtocol(lc fx.Lifecycle, input RegisterStreamProtocolInput)
- type NewEventRegistryOutput
- type RegisterEventProtocolInput
- type RegisterPubsubProtocolInput
- type RegisterStreamProtocolInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterEventProtocol ¶
func RegisterEventProtocol(lc fx.Lifecycle, input RegisterEventProtocolInput) error
RegisterEvents 注册事件
func RegisterPubsubProtocol ¶
func RegisterPubsubProtocol(lc fx.Lifecycle, input RegisterPubsubProtocolInput)
RegisterPubsubProtocol 注册订阅
func RegisterStreamProtocol ¶
func RegisterStreamProtocol(lc fx.Lifecycle, input RegisterStreamProtocolInput)
RegisterStreamProtocol 注册流
Types ¶
type NewEventRegistryOutput ¶
type NewEventRegistryOutput struct { fx.Out Registry *eventbus.EventRegistry // 事件总线 }
func NewEventRegistry ¶
func NewEventRegistry(lc fx.Lifecycle) (out NewEventRegistryOutput, err error)
NewEventRegistry 新的事件总线
type RegisterEventProtocolInput ¶
type RegisterEventProtocolInput struct { fx.In Ctx context.Context // 全局上下文 Opt *opts.Options // 文件存储选项配置 P2P *dep2p.DeP2P // DeP2P网络主机 PubSub *pubsub.DeP2PPubSub // DeP2P网络订阅 DB *sqlites.SqliteDB // sqlite数据库服务 UploadChan chan *core.UploadChan // 用于刷新上传的通道 DownloadChan chan *core.DownloadChan // 用于刷新下载的通道 Registry *eventbus.EventRegistry // 事件总线 Cache *ristretto.Cache // 缓存实例 Pool *pool.MemoryPool // 内存池 }
type RegisterPubsubProtocolInput ¶
type RegisterPubsubProtocolInput struct { fx.In Ctx context.Context // 全局上下文 Opt *opts.Options // 文件存储选项配置 P2P *dep2p.DeP2P // DeP2P网络主机 PubSub *pubsub.DeP2PPubSub // DeP2P网络订阅 DB *sqlites.SqliteDB // sqlite数据库服务 UploadChan chan *core.UploadChan // 用于刷新上传的通道 DownloadChan chan *core.DownloadChan // 用于刷新下载的通道 SearchChan chan *core.SearchChan // 用于刷新搜索的通道 Registry *eventbus.EventRegistry // 事件总线 Cache *ristretto.Cache // 缓存实例 Pool *pool.MemoryPool // 内存池 }
type RegisterStreamProtocolInput ¶
type RegisterStreamProtocolInput struct { fx.In Ctx context.Context // 全局上下文 Opt *opts.Options // 文件存储选项配置 P2P *dep2p.DeP2P // DeP2P网络主机 PubSub *pubsub.DeP2PPubSub // DeP2P网络订阅 DB *sqlites.SqliteDB // sqlite数据库服务 UploadChan chan *core.UploadChan // 用于刷新上传的通道 DownloadChan chan *core.DownloadChan // 用于刷新下载的通道 StorageChan chan *core.StorageChan // 用于存储奖励的通知 Registry *eventbus.EventRegistry // 事件总线 Cache *ristretto.Cache // 缓存实例 Pool *pool.MemoryPool // 内存池 }
Click to show internal directories.
Click to hide internal directories.