28 lines
832 B
Go
28 lines
832 B
Go
package runner
|
|
|
|
import (
|
|
`time`
|
|
|
|
`r00t2.io/gobroke/conf`
|
|
`r00t2.io/gobroke/tunnelbroker`
|
|
)
|
|
|
|
// 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
|
|
}
|