update... work pending

This commit is contained in:
brent saner
2025-02-04 12:14:08 -05:00
parent 3b4d712722
commit 3c984a0636
39 changed files with 2122 additions and 597 deletions

View File

@@ -1,11 +1,27 @@
package runner
import (
`r00t2.io/gobroke/cachedb`
`time`
`r00t2.io/gobroke/conf`
`r00t2.io/gobroke/tunnelbroker`
)
type Updater struct {
cfg *conf.Config
cache *cachedb.Cache
// TunnelResult is returned from a Tunnel.Update, and is also passed to the tunnel's templates/templated commands.
type TunnelResult struct {
// Config defines the user-provided configuration.
Config *conf.Tunnel
// TunnelBefore is the tunnelbroker.net tunnel configuration before any updates.
TunnelBefore *tunnelbroker.Tunnel
/*
TunnelAfter is the tunnelbroker.net tunnel configuration after any updates.
If no updates were made, this will point to the exact memory as
TunnelBefore.
*/
TunnelAfter *tunnelbroker.Tunnel
// Updated is true if the tunnel's client IP was updated.
Updated bool
// Changed is true if any of the relevant commands/templates/etc. were run/written.
Changed bool
RunTimestamp time.Time
}