INNER CODE UNIT · Go

NewClient

chenmingyong0423/go-mongox · client.go:28

func NewClient(client *mongo.Client, config *Config) *Client {
	return &Client{
		client: client,
		cfg:    config,
	}
}

// Client returns the mongo client
func (c *Client) Client() *mongo.Client {
	return c.client
}

func (c *Client) config() *Config {
	return c.cfg
}

func (c *Client) Disconnect(ctx context.Context) error {
	return c.client.Disconnect(ctx)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…