|
|
@@ -86,27 +86,6 @@ func bootstrapBroadcastState(config structs.SysConfig) (structs.AuthBroadcast, e
|
|
|
return res, nil
|
|
|
}
|
|
|
|
|
|
-// // update broadcastState with a map of items
|
|
|
-// func UpdateBroadcastState(values map[string]interface{}) error {
|
|
|
-// mu.Lock()
|
|
|
-// defer mu.Unlock()
|
|
|
-// v := reflect.ValueOf(&broadcastState).Elem()
|
|
|
-// for key, value := range values {
|
|
|
-// // we are matching the map key with the broadcastState item
|
|
|
-// field := v.FieldByName(key)
|
|
|
-// if !field.IsValid() || !field.CanSet() {
|
|
|
-// return fmt.Errorf("field %s does not exist or is not settable", key)
|
|
|
-// }
|
|
|
-// val := reflect.ValueOf(value)
|
|
|
-// if field.Type() != val.Type() {
|
|
|
-// return fmt.Errorf("type mismatch for field %s: expected %s, got %s", key, field.Type(), val.Type())
|
|
|
-// }
|
|
|
-// field.Set(val)
|
|
|
-// }
|
|
|
-// BroadcastToClients()
|
|
|
-// return nil
|
|
|
-// }
|
|
|
-
|
|
|
// update broadcastState with a map of items
|
|
|
func UpdateBroadcastState(values map[string]interface{}) error {
|
|
|
mu.Lock()
|