MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / getDatabaseProfile

Function getDatabaseProfile

cmd/cql-proxy/api/utils.go:82–97  ·  view source on GitHub ↗
(dbID proto.DatabaseID)

Source from the content-addressed store, hash-verified

80}
81
82func getDatabaseProfile(dbID proto.DatabaseID) (profile *types.SQLChainProfile, err error) {
83 req := &types.QuerySQLChainProfileReq{
84 DBID: dbID,
85 }
86 resp := &types.QuerySQLChainProfileResp{}
87
88 err = mux.RequestBP(route.MCCQuerySQLChainProfile.String(), req, resp)
89 if err != nil {
90 err = errors.Wrapf(err, "query chain profile failed")
91 return
92 }
93
94 profile = &resp.Profile
95
96 return
97}
98
99func getDatabaseLeaderNodeID(dbID proto.DatabaseID) (nodeID proto.NodeID, err error) {
100 profile, err := getDatabaseProfile(dbID)

Callers 4

databaseBalanceFunction · 0.85
TopUpTaskFunction · 0.85
getProjectsFunction · 0.85
getDatabaseLeaderNodeIDFunction · 0.85

Calls 2

RequestBPFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected