mdbutils

package module
v0.0.3-0...-d79a22f Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: GPL-3.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TypeIsDBGrid    = "isdbgrid"
	TypeMongos      = "mongos"
	TypeMongod      = "mongod"
	TypeShardServer = "shardsvr"
)

Variables

View Source
var (
	ErrCannotGetProcess   = fmt.Errorf("cannot get process")
	ErrCannotGetClusterID = fmt.Errorf("cannot get cluster ID")
	ErrNotYetInitialized  = int32(94)
)

Functions

func ClusterID

func ClusterID(ctx context.Context, client *mongo.Client) (string, error)

func MyState

func MyState(ctx context.Context, client *mongo.Client) (int, error)

func ReplicasetConfig

func ReplicasetConfig(ctx context.Context, client *mongo.Client) (*proto.ReplicasetConfig, error)

Types

type HostInfo

type HostInfo struct {
	Hostname          string
	HostOsType        string
	HostSystemCPUArch string
	HostDatabases     int
	HostCollections   int
	DBPath            string

	ProcPath         string
	ProcUserName     string
	ProcCreateTime   time.Time
	ProcProcessCount int

	// Server Status
	ProcessName    string
	ReplicasetName string
	Version        string
	NodeType       string
}

func GetHostInfo

func GetHostInfo(ctx context.Context, client *mongo.Client) (*HostInfo, error)

type ProcInfo

type ProcInfo struct {
	CreateTime time.Time
	Path       string
	UserName   string
	Error      error
}

Directories

Path Synopsis
internal
tu
Package tu has Test Util functions
Package tu has Test Util functions

Jump to

Keyboard shortcuts

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