mongo

package
v1.0.402 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Mongo

type Mongo struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Mongo) Client added in v1.0.0

func (c *Mongo) Client() (client *mongo.Client, err error)

func (*Mongo) DefaultClient added in v1.0.0

func (c *Mongo) DefaultClient() *mongo.Client

func (*Mongo) GetConfig added in v1.0.0

func (*Mongo) OnInitError

func (c *Mongo) OnInitError(e error) (client *mongo.Client, err error)

func (*Mongo) Start added in v1.0.4

func (c *Mongo) Start() (err error)

type Stores

type Stores struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewStore

func NewStore() *Stores

func (*Stores) LoadClient

func (c *Stores) LoadClient(id string) (client *Mongo, ok bool)

func (*Stores) LoadClientByTag

func (c *Stores) LoadClientByTag(ta string) (client *Mongo, ok bool)

func (*Stores) StoreClient

func (c *Stores) StoreClient(client *Mongo)

Jump to

Keyboard shortcuts

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