mongo

package
v1.9.0 Latest Latest
Warning

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

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

Documentation

Overview

Package mongo implements a probe client for the MongoDB database.

Index

Constants

View Source
const Kind string = "Mongo"

Kind is the type of driver

Variables

This section is empty.

Functions

This section is empty.

Types

type Mongo

type Mongo struct {
	conf.Options `yaml:",inline"`
	ConnStr      string                 `yaml:"conn_str,omitempty" json:"conn_str,omitempty"`
	ClientOpt    *options.ClientOptions `yaml:"-" json:"-"`
	Context      context.Context        `yaml:"-" json:"-"`
}

Mongo is the Mongo client

func New

func New(opt conf.Options) (*Mongo, error)

New create a Mongo client

func (*Mongo) Kind

func (r *Mongo) Kind() string

Kind return the name of client

func (*Mongo) Probe

func (r *Mongo) Probe() (bool, string)

Probe do the health check

Jump to

Keyboard shortcuts

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