tailcfg: add SSHRecorderFailureAction and SSHRecordingFailureNotifyRequest

This allows control to specify how to handle situations where the recorder
isn't available.

Updates tailscale/corp#9967

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2023-04-19 21:10:55 -07:00
committed by Maisem Ali
parent e3b2250e26
commit f66ddb544c
3 changed files with 68 additions and 1 deletions

View File

@@ -941,6 +941,13 @@ func (v SSHActionView) AllowAgentForwarding() bool { return v.ж.All
func (v SSHActionView) HoldAndDelegate() string { return v.ж.HoldAndDelegate }
func (v SSHActionView) AllowLocalPortForwarding() bool { return v.ж.AllowLocalPortForwarding }
func (v SSHActionView) Recorders() views.Slice[netip.AddrPort] { return views.SliceOf(v.ж.Recorders) }
func (v SSHActionView) OnRecordingFailure() *SSHRecorderFailureAction {
if v.ж.OnRecordingFailure == nil {
return nil
}
x := *v.ж.OnRecordingFailure
return &x
}
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
var _SSHActionViewNeedsRegeneration = SSHAction(struct {
@@ -952,6 +959,7 @@ var _SSHActionViewNeedsRegeneration = SSHAction(struct {
HoldAndDelegate string
AllowLocalPortForwarding bool
Recorders []netip.AddrPort
OnRecordingFailure *SSHRecorderFailureAction
}{})
// View returns a readonly view of SSHPrincipal.