MCPcopy
hub / github.com/dropbox/godropbox / singletonImpl

Struct singletonImpl

singleton/singleton.go:33–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33type singletonImpl struct {
34 sync.Mutex
35
36 // The actual singleton object
37 data interface{}
38 // Constructor for the singleton object
39 init SingletonInitFunc
40 // Non-zero if init was run without error
41 initialized int32
42}
43
44func (s *singletonImpl) Get() (interface{}, error) {
45 // Don't lock in the common case

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected