ssdb

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

by Iori 2022/1/4

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	InstanceID   int    `json:"InstanceId"`
	Key          string `json:"Key"`
	IP           string `json:"Ip"`
	Port         int    `json:"Port"`
	User         string `json:"User"`
	Password     string `json:"Password"`
	Description  string `json:"Description"`
	HealthSecond int    `json:"HealthSecond"`
	MaxPool      int    `json:"MaxPool"`
	AutoClose    bool   `json:"AutoClose"`
	MaxWaitSize  int    `json:"MaxWaitSize"`
}

ssdb config

type Ssdb

type Ssdb struct {
	Engine *pool.Connectors
}

func NewSsdbEngine

func NewSsdbEngine() *Ssdb

func (*Ssdb) AddInstance

func (self *Ssdb) AddInstance(sdc Config) (*pool.Connectors, error)

type SsdbMgr

type SsdbMgr struct {
	Instances map[string]*Ssdb
	// contains filtered or unexported fields
}

func NewSsdbMgr

func NewSsdbMgr() *SsdbMgr

func (*SsdbMgr) GetEngine

func (self *SsdbMgr) GetEngine(keys ...string) *pool.Connectors

func (*SsdbMgr) GetSsdb

func (self *SsdbMgr) GetSsdb(keys ...string) *Ssdb

func (*SsdbMgr) InitAndRun

func (self *SsdbMgr) InitAndRun(cfgs []Config) error

func (*SsdbMgr) SetSsdb

func (self *SsdbMgr) SetSsdb(key string, o *Ssdb)

func (*SsdbMgr) Tick

func (self *SsdbMgr) Tick(nowMs int64)

tick

Jump to

Keyboard shortcuts

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