• Miek Gieben's avatar
    plugin/file: simplify locking (#3024) · eba020e6
    Miek Gieben authored
    * plugin/file: simplify locking
    
    Simplify the locking, remove the reloadMu and just piggyback on the
    other lock for accessing content, which assumes things can be move
    underneath.
    
    Copy the Apex and Zone to new vars to make sure the pointer isn't
    updated from under us.
    
    The releadMu isn't need at all, the time.Ticker firing while we're
    reading means we will just miss that tick and get it on the next go.
    
    Add rrutil subpackage and put some more generic functions in there, that
    are now used from file and the tree package. This removes some
    duplication.
    
    Rename additionalProcessing that didn't actually do that to
    externalLookup, because that's what being done at some point.
    Signed-off-by: default avatarMiek Gieben <miek@miek.nl>
    
    * Update plugin/file/lookup.go
    Co-Authored-By: default avatarMichael Grosser <development@stp-ip.net>
    eba020e6
zone.go 4.65 KB