Documentation ¶
Overview ¶
This code is mostly copied from Beego BeeMap
Index ¶
- func Decode(c *cli.Context, decoder *decoder.Decoder, filepath string)
- func Dump(path string) (map[string]interface{}, error)
- func InitHTMLTmpl()
- func Key(key string) string
- func ServeHTML(w http.ResponseWriter, layout string, content string, ...)
- func Show(c *cli.Context)
- func Slot(key string) int
- func ToCliWriter(cli *cli.Context)
- type Counter
- type PrefixEntry
- type SafeMap
- type SlotEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitHTMLTmpl ¶
func InitHTMLTmpl()
func ServeHTML ¶
func ServeHTML(w http.ResponseWriter, layout string, content string, data map[string]interface{})
ServeHTML generate and write html to client
func ToCliWriter ¶
ToCliWriter dump rdb file statistical information to STDOUT.
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter for redis memory useage
func (*Counter) GetLargestEntries ¶
GetLargestEntries from heap, num max is 500
func (*Counter) GetLargestKeyPrefixes ¶
func (c *Counter) GetLargestKeyPrefixes() []*PrefixEntry
GetLargestKeyPrefixes from heap
func (*Counter) GetLenLevelCount ¶
func (c *Counter) GetLenLevelCount() []*PrefixEntry
GetLenLevelCount from map
type PrefixEntry ¶
PrefixEntry record value by prefix
type SafeMap ¶
type SafeMap struct {
// contains filtered or unexported fields
}
SafeMap is a map which concurrency safe
func (*SafeMap) Get ¶
func (m *SafeMap) Get(k interface{}) interface{}
Get from maps return the k's value
func (*SafeMap) Items ¶
func (m *SafeMap) Items() map[interface{}]interface{}
Items returns all items in safemap.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.