GoBroke/runner/types.go

28 lines
832 B
Go
Raw Normal View History

package runner
import (
2025-02-04 12:14:08 -05:00
`time`
`r00t2.io/gobroke/conf`
2025-02-04 12:14:08 -05:00
`r00t2.io/gobroke/tunnelbroker`
)
2025-02-04 12:14:08 -05:00
// 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
}