camlistore.org: camlistore.org/pkg/sorted/mongo Index | Files

package mongo

import "camlistore.org/pkg/sorted/mongo"

Package mongo provides an implementation of sorted.KeyValue using MongoDB.

Index

Package Files

mongokv.go

Constants

const (
    CollectionName = "keys" // MongoDB collection, equiv. to SQL table

)

We explicitly separate the key and the value in a document, instead of simply storing as key:value, to avoid problems such as "." being an illegal char in a key name. Also because there is no way to do partial matching for key names (one can only check for their existence with bson.M{$exists: true}).

func Ping Uses

func Ping(host string, timeout time.Duration) bool

Ping tests if MongoDB on host can be dialed.

Package mongo imports 9 packages (graph) and is imported by 16 packages. Updated 2018-01-02. Refresh now. Tools for package owners.