Documentation ¶
Index ¶
- type DialContext
- func (c *DialContext) Close()
- func (c *DialContext) EnsureCounter(db string, collection string, id string) error
- func (c *DialContext) EnsureIndex(db string, collection string, key []string) error
- func (c *DialContext) EnsureUniqueIndex(db string, collection string, key []string) error
- func (c *DialContext) NextSeq(db string, collection string, id string) (int, error)
- func (c *DialContext) Ref() *Session
- func (c *DialContext) UnRef(s *Session)
- type Session
- type SessionHeap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DialContext ¶
func DialWithTimeout ¶
func DialWithTimeout(url string, sessionNum int, dialTimeout time.Duration, timeout time.Duration) (*DialContext, error)
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
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)
Click to show internal directories.
Click to hide internal directories.