MCPcopy
hub / github.com/uber/aresdb / ListTables

Method ListTables

controller/mutators/etcd/schema_mutator.go:42–56  ·  view source on GitHub ↗
(namespace string)

Source from the content-addressed store, hash-verified

40}
41
42func (m *tableSchemaMutator) ListTables(namespace string) (tableNames []string, err error) {
43 var tableListProto pb.EntityList
44 tableListProto, _, err = readEntityList(m.txnStore, utils.SchemaListKey(namespace))
45 if err != nil {
46 return
47 }
48
49 for _, t := range tableListProto.Entities {
50 if !t.Tomstoned {
51 tableNames = append(tableNames, t.Name)
52 }
53 }
54
55 return tableNames, nil
56}
57
58func (m *tableSchemaMutator) GetTable(namespace, name string) (table *metaCom.Table, err error) {
59 var schemaProto pb.EntityConfig

Callers 1

TestSchemaMutatorFunction · 0.95

Calls 2

SchemaListKeyFunction · 0.92
readEntityListFunction · 0.85

Tested by 1

TestSchemaMutatorFunction · 0.76