tool

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvMongoDBPort    = "MONGODB_PORT"
	EnvMongoDBReplset = "MONGODB_REPLSET"

	// clusterMonitor user
	EnvMongoDBClusterMonitorUser     = "MONGODB_CLUSTER_MONITOR_USER"
	EnvMongoDBClusterMonitorPassword = "MONGODB_CLUSTER_MONITOR_PASSWORD"

	// mongodb ssl
	EnvMongoDBNetSSLEnabled    = "MONGODB_NET_SSL_ENABLED"
	EnvMongoDBNetSSLInsecure   = "MONGODB_NET_SSL_INSECURE"
	EnvMongoDBNetSSLPEMKeyFile = "MONGODB_NET_SSL_PEM_KEY_FILE"
	EnvMongoDBNetSSLCAFile     = "MONGODB_NET_SSL_CA_FILE"
)
View Source
const Author = "Percona LLC."

Author is the author used by kingpin

View Source
const (
	Version = "0.5.0"
)

Variables

View Source
var (
	DefaultMongoDBHost            = "localhost"
	DefaultMongoDBPort            = "27017"
	DefaultMongoDBAuthDB          = "admin"
	DefaultMongoDBTimeout         = "5s"
	DefaultMongoDBTimeoutDuration = time.Duration(5) * time.Second
)

Functions

func NewConfig

func NewConfig(app *kingpin.Application, envUser string, envPassword string) (*db.Config, error)

Types

type App

type App struct {
	*kingpin.Application
}

func New

func New(help, commit, branch string) *App

New sets up a new kingpin.Application

func (*App) Run

func (app *App) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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