mongodb

package
v0.0.0-...-83fd405 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DialContext

type DialContext struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func Dial

func Dial(url string, sessionNum int) (*DialContext, error)

goroutine safe

func DialWithTimeout

func DialWithTimeout(url string, sessionNum int, dialTimeout time.Duration, timeout time.Duration) (*DialContext, error)

goroutine safe

func (*DialContext) Close

func (c *DialContext) Close()

goroutine safe

func (*DialContext) EnsureCounter

func (c *DialContext) EnsureCounter(db string, collection string, id string) error

goroutine safe

func (*DialContext) EnsureIndex

func (c *DialContext) EnsureIndex(db string, collection string, key []string) error

goroutine safe

func (*DialContext) EnsureUniqueIndex

func (c *DialContext) EnsureUniqueIndex(db string, collection string, key []string) error

goroutine safe

func (*DialContext) NextSeq

func (c *DialContext) NextSeq(db string, collection string, id string) (int, error)

goroutine safe

func (*DialContext) Ref

func (c *DialContext) Ref() *Session

goroutine safe

func (*DialContext) UnRef

func (c *DialContext) UnRef(s *Session)

goroutine safe

type Session

type Session struct {
	*mgo.Session
	// contains filtered or unexported fields
}

session

type SessionHeap

type SessionHeap []*Session

session heap

func (SessionHeap) Len

func (h SessionHeap) Len() int

func (SessionHeap) Less

func (h SessionHeap) Less(i, j int) bool

func (*SessionHeap) Pop

func (h *SessionHeap) Pop() interface{}

func (*SessionHeap) Push

func (h *SessionHeap) Push(s interface{})

func (SessionHeap) Swap

func (h SessionHeap) Swap(i, j int)

Jump to

Keyboard shortcuts

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