80f923a47a
This commit refactors the state store usage code to track unique service name changes on transaction commit. This means we only need to lookup usage entries when reading the information, as opposed to iterating over a large number of service indices. - Take into account a service instance's name being changed - Do not iterate through entire list of service instances, we only care about whether there is 0, 1, or more than 1.
16 lines
316 B
Go
16 lines
316 B
Go
// +build !consulent
|
|
|
|
package state
|
|
|
|
import (
|
|
memdb "github.com/hashicorp/go-memdb"
|
|
)
|
|
|
|
type EnterpriseServiceUsage struct{}
|
|
|
|
func addEnterpriseServiceUsage(map[string]int, memdb.Change, uniqueServiceState) {}
|
|
|
|
func compileEnterpriseUsage(tx ReadTxn, usage ServiceUsage) (ServiceUsage, error) {
|
|
return usage, nil
|
|
}
|