mongo

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v1.1.4

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

func NewClient added in v1.1.4

func NewClient(cli *mongo.Client, db *mongo.Database, rawConfig settings.Mongo) *Client

func SetUp added in v1.1.4

func SetUp(conf settings.Mongo) (*Client, error)

SetUp 初始化mongo

func (*Client) Close added in v1.1.4

func (c *Client) Close() error

Close 关闭连接

func (*Client) GetDB added in v1.2.3

func (c *Client) GetDB() *mongo.Database

GetDB 获取原生db

func (*Client) Heartbeat added in v1.1.5

func (c *Client) Heartbeat() error

Heartbeat ping连接

func (*Client) WatchHeartbeat added in v1.1.4

func (c *Client) WatchHeartbeat()

WatchHeartbeat 监测心跳和重连

Jump to

Keyboard shortcuts

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