mongosnap

package
v0.0.0-...-eeebc8f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2018 License: MIT Imports: 4 Imported by: 2

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL