util

package
v0.0.0-...-182d01c Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package util is a collection of utility functions used within CPM.

Index

Constants

This section is empty.

Variables

View Source
var CPMBASE string

Functions

func CleanName

func CleanName(name string) string

func FastPing

func FastPing(port string, host string) (string, error)

FastPing returns either OFFLINE or RUNNING for a host and port combination

func GetBase

func GetBase() string

func GetConnection

func GetConnection(database string) (*sql.DB, error)

GetConnection get a database connection to a given database name, uses environment variables to get the hostname, user, password, and port numbers returns a database connection

func GetMonitoringConnection

func GetMonitoringConnection(dbHost string, dbUser string, dbPort string, database string, dbPassword string) (*sql.DB, error)

GetMonitoringConnection used by monitoring to connect to a container database returns a database connection

Types

This section is empty.

Jump to

Keyboard shortcuts

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