Documentation ¶
Index ¶
- Variables
- func AddItem(key string, val *cmodel.GraphItem)
- func GetAllItems(key string) []*cmodel.GraphItem
- func GetLastItem(key string) *cmodel.GraphItem
- type GraphItemMap
- func (this *GraphItemMap) FetchAll(key string) []*cmodel.GraphItem
- func (this *GraphItemMap) First(key string) *cmodel.GraphItem
- func (this *GraphItemMap) Get(key string) (*SafeLinkedList, bool)
- func (this *GraphItemMap) Getitems(idx int) map[string]*SafeLinkedList
- func (this *GraphItemMap) KeysByIndex(idx int) []string
- func (this *GraphItemMap) Len() int
- func (this *GraphItemMap) PopAll(key string) []*cmodel.GraphItem
- func (this *GraphItemMap) PushFront(key string, val *cmodel.GraphItem)
- func (this *GraphItemMap) Set(key string, val *SafeLinkedList)
- type SafeLinkedList
- func (this *SafeLinkedList) Back() *list.Element
- func (this *SafeLinkedList) FetchAll() []*cmodel.GraphItem
- func (this *SafeLinkedList) Front() *list.Element
- func (this *SafeLinkedList) Len() int
- func (this *SafeLinkedList) PopAll() []*cmodel.GraphItem
- func (this *SafeLinkedList) PopBack() *list.Element
- func (this *SafeLinkedList) PushFront(v interface{}) *list.Element
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // mem: front = = = back // time: latest ... old HistoryCache = tmap.NewSafeMap() )
Functions ¶
func GetAllItems ¶
func GetLastItem ¶
Types ¶
type GraphItemMap ¶
type GraphItemMap struct { sync.RWMutex A []map[string]*SafeLinkedList Size int }
var GraphItems *GraphItemMap
func (*GraphItemMap) Get ¶
func (this *GraphItemMap) Get(key string) (*SafeLinkedList, bool)
func (*GraphItemMap) Getitems ¶
func (this *GraphItemMap) Getitems(idx int) map[string]*SafeLinkedList
func (*GraphItemMap) KeysByIndex ¶
func (this *GraphItemMap) KeysByIndex(idx int) []string
func (*GraphItemMap) Len ¶
func (this *GraphItemMap) Len() int
func (*GraphItemMap) PushFront ¶
func (this *GraphItemMap) PushFront(key string, val *cmodel.GraphItem)
func (*GraphItemMap) Set ¶
func (this *GraphItemMap) Set(key string, val *SafeLinkedList)
type SafeLinkedList ¶
func (*SafeLinkedList) Back ¶
func (this *SafeLinkedList) Back() *list.Element
func (*SafeLinkedList) FetchAll ¶
func (this *SafeLinkedList) FetchAll() []*cmodel.GraphItem
return为倒叙的?
func (*SafeLinkedList) Front ¶
func (this *SafeLinkedList) Front() *list.Element
func (*SafeLinkedList) Len ¶
func (this *SafeLinkedList) Len() int
func (*SafeLinkedList) PopAll ¶
func (this *SafeLinkedList) PopAll() []*cmodel.GraphItem
remain参数表示要给linkedlist中留几个元素 在cron中刷磁盘的时候要留一个,用于创建数据库索引 在程序退出的时候要一个不留的全部刷到磁盘
func (*SafeLinkedList) PopBack ¶
func (this *SafeLinkedList) PopBack() *list.Element
func (*SafeLinkedList) PushFront ¶
func (this *SafeLinkedList) PushFront(v interface{}) *list.Element
Click to show internal directories.
Click to hide internal directories.