MCPcopy Index your code
hub / github.com/evilsocket/sum / LoadOracles

Function LoadOracles

storage/oracles.go:15–25  ·  view source on GitHub ↗

LoadOracles loads raw protobuf oracles from the data files found in a given path.

(dataPath string)

Source from the content-addressed store, hash-verified

13// LoadOracles loads raw protobuf oracles from
14// the data files found in a given path.
15func LoadOracles(dataPath string) (*Oracles, error) {
16 o := &Oracles{
17 Index: WithDriver(dataPath, OracleDriver{}),
18 }
19
20 if err := o.Load(); err != nil {
21 return nil, err
22 }
23
24 return o, nil
25}
26
27// Find returns a *pb.Oracle object given its identifier,
28// or nil if not found.

Callers 11

BenchmarkOraclesFindFunction · 0.85
BenchmarkOraclesUpdateFunction · 0.85
BenchmarkOraclesDeleteFunction · 0.85
setupOraclesFunction · 0.85
TestLoadOraclesFunction · 0.85
TestOraclesFindFunction · 0.85
TestOraclesUpdateFunction · 0.85
TestOraclesDeleteFunction · 0.85

Calls 2

WithDriverFunction · 0.85
LoadMethod · 0.80

Tested by 11

BenchmarkOraclesFindFunction · 0.68
BenchmarkOraclesUpdateFunction · 0.68
BenchmarkOraclesDeleteFunction · 0.68
setupOraclesFunction · 0.68
TestLoadOraclesFunction · 0.68
TestOraclesFindFunction · 0.68
TestOraclesUpdateFunction · 0.68
TestOraclesDeleteFunction · 0.68