state: remove duplicate function
catalogChecksForNodeService was a duplicate of catalogListServiceChecks
This commit is contained in:
parent
e87d2bb24f
commit
b781fec664
|
@ -1317,7 +1317,7 @@ func (s *Store) deleteServiceTxn(tx WriteTxn, idx uint64, nodeName, serviceID st
|
||||||
|
|
||||||
// Delete any checks associated with the service. This will invalidate
|
// Delete any checks associated with the service. This will invalidate
|
||||||
// sessions as necessary.
|
// sessions as necessary.
|
||||||
checks, err := catalogChecksForNodeService(tx, nodeName, serviceID, entMeta)
|
checks, err := catalogListServiceChecks(tx, nodeName, serviceID, entMeta)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed service check lookup: %s", err)
|
return fmt.Errorf("failed service check lookup: %s", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,11 +157,11 @@ func catalogListChecks(tx ReadTxn, _ *structs.EnterpriseMeta) (memdb.ResultItera
|
||||||
}
|
}
|
||||||
|
|
||||||
func catalogListNodeChecks(tx ReadTxn, node string) (memdb.ResultIterator, error) {
|
func catalogListNodeChecks(tx ReadTxn, node string) (memdb.ResultIterator, error) {
|
||||||
return tx.Get("checks", "node_service_check", node, false)
|
return tx.Get("checks", indexNodeServiceCheck, node, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
func catalogListServiceChecks(tx ReadTxn, node string, service string, _ *structs.EnterpriseMeta) (memdb.ResultIterator, error) {
|
func catalogListServiceChecks(tx ReadTxn, node string, service string, _ *structs.EnterpriseMeta) (memdb.ResultIterator, error) {
|
||||||
return tx.Get("checks", "node_service", node, service)
|
return tx.Get("checks", indexNodeService, node, service)
|
||||||
}
|
}
|
||||||
|
|
||||||
func catalogInsertCheck(tx WriteTxn, chk *structs.HealthCheck, idx uint64) error {
|
func catalogInsertCheck(tx WriteTxn, chk *structs.HealthCheck, idx uint64) error {
|
||||||
|
@ -177,10 +177,6 @@ func catalogInsertCheck(tx WriteTxn, chk *structs.HealthCheck, idx uint64) error
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func catalogChecksForNodeService(tx ReadTxn, node string, service string, entMeta *structs.EnterpriseMeta) (memdb.ResultIterator, error) {
|
|
||||||
return tx.Get("checks", "node_service", node, service)
|
|
||||||
}
|
|
||||||
|
|
||||||
func validateRegisterRequestTxn(_ ReadTxn, _ *structs.RegisterRequest, _ bool) (*structs.EnterpriseMeta, error) {
|
func validateRegisterRequestTxn(_ ReadTxn, _ *structs.RegisterRequest, _ bool) (*structs.EnterpriseMeta, error) {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue