service

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartMultiDBProvider

func StartMultiDBProvider(Server string)

Types

type TClusterDBProvider

type TClusterDBProvider struct {
	Server string
	// contains filtered or unexported fields
}

func (*TClusterDBProvider) Exit

func (this *TClusterDBProvider) Exit()

func (*TClusterDBProvider) GetRedisConn

func (this *TClusterDBProvider) GetRedisConn() redis.Conn

func (*TClusterDBProvider) LoopDBUpdate

func (this *TClusterDBProvider) LoopDBUpdate(wg *sync.WaitGroup)

func (*TClusterDBProvider) Start

func (this *TClusterDBProvider) Start(Server string)

type TDBProvider

type TDBProvider struct {
	Server string
	// contains filtered or unexported fields
}

func (*TDBProvider) DBGetSome

func (this *TDBProvider) DBGetSome(Output public.IDBCache) (err error)

@func: DBGetSome @param1: Identify string player only one @param2: Output public.IDBCache module need query purpose: first query from cache if not then db.

func (*TDBProvider) Get

func (this *TDBProvider) Get(Identify string, Output public.IDBCache) (err error, exist bool)

@func: Get @param1: Identify string player only one @param2: Output public.IDBCache module need query purpose: first query from cache if not exist, then find from db.

func (*TDBProvider) GetAcc

func (this *TDBProvider) GetAcc(usrName string, Output public.IDBCache) (err error, exist bool)

@func: GetAcc @param1: Identify string player only one @param2: Output public.IDBCache module need query purpose: first query use accout from db.

func (*TDBProvider) GetAkRedis

func (this *TDBProvider) GetAkRedis() *RedisConn.TAokoRedis

func (*TDBProvider) GetMogoConn

func (this *TDBProvider) GetMogoConn() *MgoConn.TAokoMgo

func (*TDBProvider) GetRedisConn

func (this *TDBProvider) GetRedisConn() redis.Conn

func (*TDBProvider) Insert

func (this *TDBProvider) Insert(Identify string, data public.IDBCache) (err error)

@func: Insert @param1: Identify string player only one @param2: data public.IDBCache module need save purpose: first insert data to cache then update db.

func (*TDBProvider) RediSave

func (this *TDBProvider) RediSave(identify string, rediskey string, data []byte, Oper ado.EDBOperType) (err error)

func (*TDBProvider) StartDBService

func (this *TDBProvider) StartDBService(Server string, upcb public.UpdateDBCacheCallBack)

func (*TDBProvider) Update

func (this *TDBProvider) Update(Identify string, data public.IDBCache, Oper ado.EDBOperType) (err error)

@func: Update @param1: Identify string player only one @param2: data public.IDBCache module need save @param3: Oper ado.EDBOperType db operation purpose: first db save data then update cache.

Jump to

Keyboard shortcuts

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