Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(params Parameters, endpoint Endpoint) (eventsourcing.MiddlewareFactory, error)
Create provisions a new instance of the memory-snap provider.
func CreateWithConnection ¶
func CreateWithConnection(params Parameters, session *mgo.Session, collection *mgo.Collection) eventsourcing.MiddlewareFactory
CreateWithConnection provisions a new instance of the memory-snap provider using an existing connection and session
Types ¶
type Endpoint ¶
type Endpoint struct { DialURL string `json:"dial_url"` // DialURL is the mgo URL to use when connecting to the cluster DatabaseName string `json:"database_name"` // DatabaseName is the database to create/connect to. CollectionName string `json:"collection_name"` // CollectionName is the collection name to put new documents in to }
Endpoint configuration
type Parameters ¶
type Parameters struct { Lazy bool // Lazy mode? SnapInterval int64 `json:"snap_interval"` // SnapInterval is the number of events between snaps }
Parameters describes the parameters that can be used to cofigure a MongoDB snap store.
Click to show internal directories.
Click to hide internal directories.