Documentation ¶
Index ¶
- func SetCache(s CacheDBer)
- func SetStream(s StreamDBer)
- func SetSyncTask(s SyncTaskDBer)
- func SetWatchCollection(s WatchCollectionDBer)
- type CacheDBer
- type ResumeToken
- type StreamDBer
- type StreamId
- type StreamIterator
- type StreamValue
- type SyncTaskDBer
- type SyncTaskIterator
- type Task
- type WatchCollectionDBer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetStream ¶
func SetStream(s StreamDBer)
func SetSyncTask ¶
func SetSyncTask(s SyncTaskDBer)
func SetWatchCollection ¶
func SetWatchCollection(s WatchCollectionDBer)
Types ¶
type CacheDBer ¶
type ResumeToken ¶
type StreamDBer ¶
type StreamDBer interface { // Save token: StreamValue的一个唯一值,常用 resume token Save(ctx context.Context, token []byte, value StreamValue) (id StreamId) Get(ctx context.Context, id StreamId) (value StreamValue, ok bool) All(ctx context.Context) StreamIterator StartWith(ctx context.Context, id StreamId) StreamIterator GetLastOne(ctx context.Context) (id StreamId, ok bool) }
func Stream ¶
func Stream() StreamDBer
type StreamIterator ¶
type StreamValue ¶
type SyncTaskDBer ¶
type SyncTaskDBer interface { All(ctx context.Context) SyncTaskIterator // InsertOrUpdate task.Id 是唯一标识符,相同的id进行覆盖 InsertOrUpdate(ctx context.Context, task Task) InsertOrUpdateBatch(ctx context.Context, tasks []Task) Del(ctx context.Context, id string) DelBatch(ctx context.Context, ids []string) DelAll(ctx context.Context) }
func SyncTask ¶
func SyncTask() SyncTaskDBer
type SyncTaskIterator ¶
type WatchCollectionDBer ¶
type WatchCollectionDBer interface { All(ctx context.Context) []config.WatchInfo Save(ctx context.Context, w []config.WatchInfo) }
func WatchCollection ¶
func WatchCollection() WatchCollectionDBer
Click to show internal directories.
Click to hide internal directories.