Documentation
¶
Index ¶
- Constants
- func GetMaxPrefix() int64
- type CachePool
- func (cp *CachePool) Available() int64
- func (cp *CachePool) Capacity() int64
- func (cp *CachePool) Close()
- func (cp *CachePool) Get(timeout time.Duration) *memcache.Connection
- func (cp *CachePool) IdleTimeout() time.Duration
- func (cp *CachePool) IsClosed() bool
- func (cp *CachePool) MaxCap() int64
- func (cp *CachePool) Open()
- func (cp *CachePool) Put(conn *memcache.Connection)
- func (cp *CachePool) ServeHTTP(response http.ResponseWriter, request *http.Request)
- func (cp *CachePool) StatsJSON() string
- func (cp *CachePool) WaitCount() int64
- func (cp *CachePool) WaitTime() time.Duration
- type CreateCacheFunc
- type DirtyKeys
- type ExecPlan
- type MemcacheStats
- type OverrideCacheDesc
- type RCResult
- type RowCache
- type RowCacheConfig
- type SchemaInfo
- func (si *SchemaInfo) Close()
- func (si *SchemaInfo) CreateOrUpdateTable(tableName string)
- func (si *SchemaInfo) DropTable(tableName string)
- func (si *SchemaInfo) Exec(sql string) (result *mysql.Result, err error)
- func (si *SchemaInfo) GetSchema() []*schema.Table
- func (si *SchemaInfo) GetTable(tableName string) *TableInfo
- func (si *SchemaInfo) SetQueryCacheSize(size int)
- type SchemaOverride
- type TableInfo
Constants ¶
View Source
const ( RC_DELETED = 1 // MAX_KEY_LEN is a value less than memcache's limit of 250. MAX_KEY_LEN = 200 // MAX_DATA_LEN prevents large rows from being inserted in rowcache. MAX_DATA_LEN = 8000 )
Variables ¶
This section is empty.
Functions ¶
func GetMaxPrefix ¶
func GetMaxPrefix() int64
Types ¶
type CachePool ¶
type CachePool struct {
DeleteExpiry uint64
// contains filtered or unexported fields
}
func NewCachePool ¶
func (*CachePool) Get ¶
func (cp *CachePool) Get(timeout time.Duration) *memcache.Connection
You must call Put after Get.
func (*CachePool) IdleTimeout ¶
func (*CachePool) Put ¶
func (cp *CachePool) Put(conn *memcache.Connection)
type CreateCacheFunc ¶
type CreateCacheFunc func() (*memcache.Connection, error)
type ExecPlan ¶
type ExecPlan struct {
*planbuilder.ExecPlan
TableInfo *TableInfo
QueryCount int64
Time time.Duration
RowCount int64
ErrorCount int64
// contains filtered or unexported fields
}
type MemcacheStats ¶
type MemcacheStats struct {
// contains filtered or unexported fields
}
MemcacheStats exports the Memcache internal stats through stats package.
func NewMemcacheStats ¶
func NewMemcacheStats(cachePool *CachePool, main, slabs, items bool) *MemcacheStats
NewMemcacheStats creates a new MemcacheStats based on given CachePool. main, slabs and items specify the categories of stats that need to be exported.
func (*MemcacheStats) Close ¶
func (s *MemcacheStats) Close()
Close clears the variable values and stops exporting the stats.
type OverrideCacheDesc ¶
type RowCache ¶
type RowCache struct {
// contains filtered or unexported fields
}
func NewRowCache ¶
type RowCacheConfig ¶
type RowCacheConfig struct {
Binary string `json:"binary"`
Memory int `json:"mem"`
Socket string `json:"socket"`
TcpPort int `json:"port"`
Connections int `json:"connections"`
Threads int `json:"threads"`
LockPaged bool `json:"lock_paged"`
}
todo: copy from vitess
func (*RowCacheConfig) GetSubprocessFlags ¶
func (c *RowCacheConfig) GetSubprocessFlags() []string
type SchemaInfo ¶
type SchemaInfo struct {
// contains filtered or unexported fields
}
func NewSchemaInfo ¶
func NewSchemaInfo(rowCacheConf RowCacheConfig, dbAddr string, user, pwd, dbName string, overrides []SchemaOverride) *SchemaInfo
func (*SchemaInfo) Close ¶
func (si *SchemaInfo) Close()
func (*SchemaInfo) CreateOrUpdateTable ¶
func (si *SchemaInfo) CreateOrUpdateTable(tableName string)
func (*SchemaInfo) DropTable ¶
func (si *SchemaInfo) DropTable(tableName string)
func (*SchemaInfo) GetSchema ¶
func (si *SchemaInfo) GetSchema() []*schema.Table
func (*SchemaInfo) GetTable ¶
func (si *SchemaInfo) GetTable(tableName string) *TableInfo
func (*SchemaInfo) SetQueryCacheSize ¶
func (si *SchemaInfo) SetQueryCacheSize(size int)
type SchemaOverride ¶
type SchemaOverride struct {
Name string
PKColumns []string
Cache *OverrideCacheDesc
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.