admintest

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugTraceEnabled

func DebugTraceEnabled() bool

DebugTraceEnabled returns true if the environment variable GO_CEPH_TEST_DEBUG_TRACE indicates that the JSON requests and responses should be traced (logged).

func NewConn

func NewConn(t *testing.T) *rados.Conn

NewConn return a new rados connection based on the default config.

func NewConnFromConfig

func NewConnFromConfig(t *testing.T, configFile string) *rados.Conn

NewConnFromConfig returns a new rados connection based on the specified config file. If configFile is the empty string, the default config is used.

func WrapConn

func WrapConn(conn *rados.Conn) ccom.RadosCommander

WrapConn wraps the given conn in as a "tracer" if so enabled in the environment.

Types

type Connector

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

Connector is a caching and convenience type for rados connections. Typically it is instantiated as a global in a go _test.go file.

func NewConnector

func NewConnector() *Connector

NewConnector returns a new Connector.

func (*Connector) Get

func (c *Connector) Get(t *testing.T) ccom.RadosCommander

Get returns a RadosCommander that may or may not be wrapped. Typically this is the one you want.

func (*Connector) GetConn

func (c *Connector) GetConn(t *testing.T) *rados.Conn

GetConn returns the underlying rados connection, either cached or newly created.

Jump to

Keyboard shortcuts

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