eventbus

package module
v0.0.0-...-d77c742 Latest Latest
Warning

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

Go to latest
Published: May 30, 2026 License: MulanPSL-2.0 Imports: 1 Imported by: 6 modules, 9 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

EventBus

💡 Introduction

Event Bus for SiYuan.

🙏 Acknowledgement

Documentation

Index

Constants

View Source
const (
	CtxPushMsg = "pushMsg"

	CtxPushMsgToNone = iota
	CtxPushMsgToProgress
	CtxPushMsgToStatusBar
	CtxPushMsgToStatusBarAndProgress
)

消息推送事件。

View Source
const (
	EvtSQLInsertBlocks       = "sql.insert.blocks"
	EvtSQLInsertBlocksFTS    = "sql.insert.blocks_fts"
	EvtSQLDeleteBlocks       = "sql.delete.blocks"
	EvtSQLUpdateBlocksHPaths = "sql.update.blocks.hPaths"

	EvtSQLInsertHistory      = "sql.insert.history"
	EvtSQLInsertAssetContent = "sql.insert.assetContent"

	EvtSQLIndexChanged = "sql.index.changed"
	EvtSQLIndexFlushed = "sql.index.flushed"
)

数据库索引事件。

View Source
const (
	EvtCheckoutBeforeWalkData    = "repo.checkout.beforeWalkData"
	EvtCheckoutWalkData          = "repo.checkout.walkData"
	EvtCheckoutUpsertFiles       = "repo.checkout.upsertFiles"
	EvtCheckoutUpsertFile        = "repo.checkout.upsertFile"
	EvtCheckoutRemoveFiles       = "repo.checkout.removeFiles"
	EvtCheckoutRemoveFile        = "repo.checkout.removeFile"
	EvtIndexBeforeWalkData       = "repo.index.beforeWalkData"
	EvtIndexWalkData             = "repo.index.walkData"
	EvtIndexBeforeGetLatestFiles = "repo.index.beforeGetLatestFiles"
	EvtIndexGetLatestFile        = "repo.index.getLatestFile"
	EvtIndexUpsertFiles          = "repo.index.upsertFiles"
	EvtIndexUpsertFile           = "repo.index.upsertFile"
)

数据仓库本地事件。

View Source
const (
	EvtCloudLock                   = "repo.cloudLock"
	EvtCloudUnlock                 = "repo.cloudUnlock"
	EvtCloudBeforeUploadIndex      = "repo.cloudBeforeUploadIndex"
	EvtCloudBeforeUploadFiles      = "repo.cloudBeforeUploadFiles"
	EvtCloudBeforeUploadFile       = "repo.cloudBeforeUploadFile"
	EvtCloudBeforeUploadChunks     = "repo.cloudBeforeUploadChunks"
	EvtCloudBeforeUploadChunk      = "repo.cloudBeforeUploadChunk"
	EvtCloudBeforeDownloadIndex    = "repo.cloudBeforeDownloadIndex"
	EvtCloudBeforeDownloadFiles    = "repo.cloudBeforeDownloadFiles"
	EvtCloudBeforeDownloadFile     = "repo.cloudBeforeDownloadFile"
	EvtCloudBeforeDownloadChunks   = "repo.cloudBeforeDownloadChunks"
	EvtCloudBeforeDownloadChunk    = "repo.cloudBeforeDownloadChunk"
	EvtCloudBeforeDownloadRef      = "repo.cloudBeforeDownloadRef"
	EvtCloudBeforeUploadRef        = "repo.cloudBeforeUploadRef"
	EvtCloudBeforeUploadIndexes    = "repo.cloudBeforeUploadIndexes"
	EvtCloudBeforeUploadCheckIndex = "repo.cloudBeforeUploadCheckIndex"
	EvtCloudBeforeFixObjects       = "repo.cloudBeforeFixObjects"
	EvtCloudAfterFixObjects        = "repo.cloudAfterFixObjects"
	EvtCloudCorrupted              = "repo.cloudCorrupted"
)

数据仓库云端同步事件。

View Source
const (
	EvtCloudPurgeListObjects     = "repo.cloudPurgeListObjects"
	EvtCloudPurgeListIndexes     = "repo.cloudPurgeListIndexes"
	EvtCloudPurgeListRefs        = "repo.cloudPurgeListRefs"
	EvtCloudPurgeDownloadIndexes = "repo.cloudPurgeDownloadIndexes"
	EvtCloudPurgeDownloadFiles   = "repo.cloudPurgeDownloadFiles"
	EvtCloudPurgeRemoveObjects   = "repo.cloudPurgeRemoveObjects"
	EvtCloudPurgeRemoveIndexes   = "repo.cloudPurgeRemoveIndexes"
	EvtCloudPurgeRemoveIndexesV2 = "repo.cloudPurgeRemoveIndexesV2"
)

云端数据仓库清理事件。

View Source
const (
	EvtEmbeddingDirty = "embedding.dirty"
)

向量化事件。

Variables

This section is empty.

Functions

func Publish

func Publish(topic string, arg ...interface{})

func Subscribe

func Subscribe(topic string, handler interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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