mongo

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusReplicationNotEnabled        = 76
	StatusReplicationNotYetInitialized = 94
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildInfo

type BuildInfo struct {
	Version string `bson:"version"`
}

type Collector

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

func New

func New(host string, username, password string, timeout time.Duration) *Collector

func (*Collector) Close

func (c *Collector) Close() error

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prometheus.Metric)

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prometheus.Desc)

type Member

type Member struct {
	State       string             `bson:"stateStr"`
	Self        bool               `bson:"self"`
	LastApplied primitive.DateTime `bson:"lastAppliedWallTime"`
}

type ReplStatus

type ReplStatus struct {
	ReplicaSet string   `bson:"set"`
	Members    []Member `bson:"members"`
}

Jump to

Keyboard shortcuts

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