util

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDBConnectionCount

func GetDBConnectionCount(dbSession *db.Session) (int, error)

GetDBConnectionCount returns the count of rows in the pg_stat_activity table

func GetTestDBSession

func GetTestDBSession(t *testing.T, reset bool) *db.Session

GetTestDBSession returns a test DB session

func GetTestIpamDB

func GetTestIpamDB(t *testing.T) cipam.Storage

GetTestIpamDB returns a test IPAM DB

func TestInitDB

func TestInitDB(t *testing.T) *db.Session

TestInitDB initializes a test DB session

Types

type TestDBConfig

type TestDBConfig struct {
	Host     string
	Port     int
	Name     string
	User     string
	Password string
}

TestDBConfig describes a test DB config params

Jump to

Keyboard shortcuts

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