Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionStruct ¶
type CollectionStruct struct {
SomePrimaryKey string `json:"some_primary_key,omitempty"`
}
CollectionStruct refers to structure stored in target collection
type CollectionStructWrapper ¶
type CollectionStructWrapper struct { CollectionStruct `json:",inline"` SomePrimaryKey string `json:"_id"` // override SomePrimaryKey with _id json identifier to unmarshall mongo data properly }
CollectionStructWrapper is a wrapper for SomeCollectionWatcher on watcher side since mongo primary key is in "_id" column
type Mock ¶
type Mock struct { Wg *sync.WaitGroup Limit int Inserted int InsertErr error Updated int UpdateErr error Deleted int DeleteErr error }
Mock is a mock implementation of SomeCollectionWatcher
type SomeCollectionWatcher ¶
type SomeCollectionWatcher struct {
// contains filtered or unexported fields
}
SomeCollectionWatcher is a watcher for SomeCollectionWatcher changes
func NewSomeCollectionWatcher ¶
func NewSomeCollectionWatcher(executor tx.Executor) *SomeCollectionWatcher
NewSomeCollectionWatcher creates a new any Collection watcher
func (SomeCollectionWatcher) Delete ¶
func (s SomeCollectionWatcher) Delete(ctx context.Context, doc []byte) error
Delete is called when a document is deleted
Click to show internal directories.
Click to hide internal directories.