Documentation ¶
Index ¶
- func StartMultiDBProvider(Server string)
- type TClusterDBProvider
- type TDBProvider
- func (this *TDBProvider) DBGetSome(Output public.IDBCache) (err error)
- func (this *TDBProvider) Get(Identify string, Output public.IDBCache) (err error, exist bool)
- func (this *TDBProvider) GetAcc(usrName string, Output public.IDBCache) (err error, exist bool)
- func (this *TDBProvider) GetAkRedis() *RedisConn.TAokoRedis
- func (this *TDBProvider) GetMogoConn() *MgoConn.TAokoMgo
- func (this *TDBProvider) GetRedisConn() redis.Conn
- func (this *TDBProvider) Insert(Identify string, data public.IDBCache) (err error)
- func (this *TDBProvider) RediSave(identify string, rediskey string, data []byte, Oper ado.EDBOperType) (err error)
- func (this *TDBProvider) StartDBService(Server string, upcb public.UpdateDBCacheCallBack)
- func (this *TDBProvider) Update(Identify string, data public.IDBCache, Oper ado.EDBOperType) (err error)
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: 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: 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.