mongodb

package
v0.0.0-...-ab75566 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

mongodb package is for using MongoDB as the storage layer for a CRAQ node.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDB

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

func New

func New(db string, opts ...*options.ClientOptions) (*MongoDB, error)

func (*MongoDB) AllCommitted

func (m *MongoDB) AllCommitted() ([]*store.Item, error)

func (*MongoDB) AllDirty

func (m *MongoDB) AllDirty() ([]*store.Item, error)

func (*MongoDB) AllNewerCommitted

func (m *MongoDB) AllNewerCommitted(verBykey map[string]uint64) ([]*store.Item, error)

func (*MongoDB) AllNewerDirty

func (m *MongoDB) AllNewerDirty(verBykey map[string]uint64) ([]*store.Item, error)

func (*MongoDB) Commit

func (m *MongoDB) Commit(key string, version uint64) error

func (*MongoDB) Connect

func (m *MongoDB) Connect(ctx context.Context) error

func (*MongoDB) Disconnect

func (m *MongoDB) Disconnect(ctx context.Context) error

func (*MongoDB) DropCollection

func (m *MongoDB) DropCollection(ctx context.Context) error

func (*MongoDB) Read

func (m *MongoDB) Read(key string) (*store.Item, error)

func (*MongoDB) ReadVersion

func (m *MongoDB) ReadVersion(key string, version uint64) (*store.Item, error)

func (*MongoDB) Write

func (m *MongoDB) Write(key string, val []byte, version uint64) error

Jump to

Keyboard shortcuts

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