docs(store): clarify shared journal flow
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
9450a293cf
commit
92db4b72ff
2 changed files with 4 additions and 2 deletions
|
|
@ -45,6 +45,8 @@ type journalExecutor interface {
|
|||
}
|
||||
|
||||
// Usage example: `result := storeInstance.CommitToJournal("scroll-session", map[string]any{"like": 4}, map[string]string{"workspace": "scroll-session"})`
|
||||
// Workspace.Commit uses this same journal write path before it updates the
|
||||
// summary row in `workspace:NAME`.
|
||||
func (storeInstance *Store) CommitToJournal(measurement string, fields map[string]any, tags map[string]string) core.Result {
|
||||
if err := storeInstance.ensureReady("store.CommitToJournal"); err != nil {
|
||||
return core.Result{Value: err, OK: false}
|
||||
|
|
|
|||
|
|
@ -287,8 +287,8 @@ func (workspace *Workspace) Aggregate() map[string]any {
|
|||
return fields
|
||||
}
|
||||
|
||||
// Commit writes one journal row for the workspace and upserts the summary row
|
||||
// in `workspace:NAME`.
|
||||
// Commit writes one journal row for the workspace through the shared journal
|
||||
// writer and upserts the summary row in `workspace:NAME`.
|
||||
//
|
||||
// Usage example: `result := workspace.Commit(); if !result.OK { return }; fmt.Println(result.Value)`
|
||||
func (workspace *Workspace) Commit() core.Result {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue