You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a lot of 100% duplicated blocks in my configuration (because I MITM several .deb mirrors to my local apt-cacher-ng instance, exactly like https://github.com/tianon/rawdns/blob/b2cec4eeff1377afdfd8c90e5a4716eb82370a09/hacks/apt-cacher-ng.md, so whatever gets implemented here should be reflected there), so it'd be nice to have some way to say something like "configuration for this new host should be copied from that other host".
I see two main ways to implement this:
{
"host1.": {
...
},
"host2.": "host1."
}
Main pros: simple for users to write
Main cons: annoying to implement (StringOrDomainConfig, etc), inflexible for later enhancement
(or "type": "copy", but I'm not sure I like that -- being able to change even the "type" of what we've copied from seems fun -- maybe "merge": "host1." is better to make it clear what's happening here)
Main pros: flexible, saves code from needing complex unmarshalling for StringOrDomainConfig
Main cons: slightly complex "merging" behavior
One thing to decide would be whether "cnames": [ "1.2.3.4" ] merged into "cnames": [ "5.6.7.8" ] becomes [ "5.6.7.8" ] or [ "1.2.3.4", "5.6.7.8" ].
The text was updated successfully, but these errors were encountered:
I've got a lot of 100% duplicated blocks in my configuration (because I MITM several
.deb
mirrors to my local apt-cacher-ng instance, exactly like https://github.com/tianon/rawdns/blob/b2cec4eeff1377afdfd8c90e5a4716eb82370a09/hacks/apt-cacher-ng.md, so whatever gets implemented here should be reflected there), so it'd be nice to have some way to say something like "configuration for this new host should be copied from that other host".I see two main ways to implement this:
Main pros: simple for users to write
Main cons: annoying to implement (
StringOrDomainConfig
, etc), inflexible for later enhancement(or
"type": "copy"
, but I'm not sure I like that -- being able to change even the "type" of what we've copied from seems fun -- maybe"merge": "host1."
is better to make it clear what's happening here)Main pros: flexible, saves code from needing complex unmarshalling for
StringOrDomainConfig
Main cons: slightly complex "merging" behavior
One thing to decide would be whether
"cnames": [ "1.2.3.4" ]
merged into"cnames": [ "5.6.7.8" ]
becomes[ "5.6.7.8" ]
or[ "1.2.3.4", "5.6.7.8" ]
.The text was updated successfully, but these errors were encountered: