nosql

package
v1.26.30 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToKVURI added in v1.26.18

func ToKVURI(connection string) *url.URL

ToKVURI converts old style connections to a KV URI

A KV URI matches the pattern:

kv://[username:password@]host[:port][/database][?[option=value]*] kvs://[username:password@]host[:port][/database][?[option=value]*] kv+socket://[username:password@]path[/database][?[option=value]*] kv+sentinel://[password@]host1 [: port1][, host2 [:port2]][, hostN [:portN]][/ database][?[option=value]*] kv+cluster://[password@]host1 [: port1][, host2 [:port2]][, hostN [:portN]][/ database][?[option=value]*]

We have previously used a URI like: addrs=127.0.0.1:6379 db=0 network=tcp,addr=127.0.0.1:6379,password=macaron,db=0,pool_size=100,idle_timeout=180

We need to convert this old style to the new style

Types

type Manager

type Manager struct {
	KVConnections map[string]*kvClientHolder
	// contains filtered or unexported fields
}

Manager is the nosql connection manager

func GetManager

func GetManager() *Manager

GetManager returns a Manager and initializes one as singleton is there's none yet

func (*Manager) CloseKVClient added in v1.26.18

func (m *Manager) CloseKVClient(connection string) error

CloseKVClient closes a KV client

func (*Manager) GetKVClient added in v1.26.18

func (m *Manager) GetKVClient(connection string) (client kv.UniversalClient)

GetKVClient gets a KV client for a particular connection

Jump to

Keyboard shortcuts

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