mongodb

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2018 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const EventsCollection = "events"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	mgo.DialInfo

	CollectionSize uint64 // in bytes
	MaxDocuments   uint
}

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func OpenConnection

func OpenConnection(cfg *Config) (*Storage, error)

func (*Storage) BulkInsert

func (s *Storage) BulkInsert(r []model.Record) error

func (*Storage) Cleanup

func (s *Storage) Cleanup(deleteBefore time.Time) error

func (*Storage) Close

func (s *Storage) Close() error

func (*Storage) Insert

func (s *Storage) Insert(r *model.Record) error

Jump to

Keyboard shortcuts

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