MCPcopy Create free account
hub / github.com/git-bug/git-bug / lazyBug

Struct lazyBug

api/graphql/models/lazy_bug.go:38–44  ·  view source on GitHub ↗

lazyBug is a lazy-loading wrapper that fetch data from the cache (BugExcerpt) in priority, and load the complete bug and snapshot only when necessary.

Source from the content-addressed store, hash-verified

36// lazyBug is a lazy-loading wrapper that fetch data from the cache (BugExcerpt) in priority,
37// and load the complete bug and snapshot only when necessary.
38type lazyBug struct {
39 cache *cache.RepoCache
40 excerpt *cache.BugExcerpt
41
42 mu sync.Mutex
43 snap *bug.Snapshot
44}
45
46func NewLazyBug(cache *cache.RepoCache, excerpt *cache.BugExcerpt) *lazyBug {
47 return &lazyBug{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected