mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
nomad: adding policy table to state store
This commit is contained in:
@@ -26,6 +26,7 @@ func stateStoreSchema() *memdb.DBSchema {
|
||||
evalTableSchema,
|
||||
allocTableSchema,
|
||||
vaultAccessorTableSchema,
|
||||
aclPolicyTableSchema,
|
||||
}
|
||||
|
||||
// Add each of the tables
|
||||
@@ -430,3 +431,21 @@ func vaultAccessorTableSchema() *memdb.TableSchema {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// aclPolicyTableSchema returns the MemDB schema for the policy table.
|
||||
// This table is used to store the policies which are refrenced by tokens
|
||||
func aclPolicyTableSchema() *memdb.TableSchema {
|
||||
return &memdb.TableSchema{
|
||||
Name: "acl_policy",
|
||||
Indexes: map[string]*memdb.IndexSchema{
|
||||
"id": &memdb.IndexSchema{
|
||||
Name: "id",
|
||||
AllowMissing: false,
|
||||
Unique: true,
|
||||
Indexer: &memdb.StringFieldIndex{
|
||||
Field: "Name",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user