MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / Add

Method Add

internal/caches/list_file_kv.go:67–78  ·  view source on GitHub ↗

Add 添加内容

(hash string, item *Item)

Source from the content-addressed store, hash-verified

65
66// Add 添加内容
67func (this *KVFileList) Add(hash string, item *Item) error {
68 err := this.getStore(hash).AddItem(hash, item)
69 if err != nil {
70 return err
71 }
72
73 if this.onAdd != nil {
74 this.onAdd(item)
75 }
76
77 return nil
78}
79
80// Exist 检查内容是否存在
81func (this *KVFileList) Exist(hash string) (bool, int64, error) {

Callers

nothing calls this directly

Calls 2

getStoreMethod · 0.95
AddItemMethod · 0.65

Tested by

no test coverage detected