Skip to content

Commit

Permalink
move Events to events.go
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed Nov 23, 2022
1 parent 3abe1b1 commit 8288b62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 0 additions & 5 deletions events/db_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ type UpdateChannel = immutables.Option[Channel[Update]]

var EmptyUpdateChannel = immutables.None[Channel[Update]]()

type Events struct {
// Updates publishes an `Update` for each document written to in the database.
Updates UpdateChannel
}

// UpdateEvent represents a new DAG node added to the
// append-only MerkleCRDT Clock graph of a
// document or sub-field.
Expand Down
6 changes: 6 additions & 0 deletions events/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@ var _ Channel[int] = (*simpleChannel[int])(nil)
func New[T any](subscriberBufferSize int, eventBufferSize int) Channel[T] {
return NewSimpleChannel[T](subscriberBufferSize, eventBufferSize)
}

// Events hold the supported event types
type Events struct {
// Updates publishes an `Update` for each document written to in the database.
Updates UpdateChannel
}

0 comments on commit 8288b62

Please sign in to comment.