update... work pending
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user