diff options
Diffstat (limited to 'internal/clients/connectors/connector.go')
| -rw-r--r-- | internal/clients/connectors/connector.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/clients/connectors/connector.go b/internal/clients/connectors/connector.go index 3ab6a08..00de32e 100644 --- a/internal/clients/connectors/connector.go +++ b/internal/clients/connectors/connector.go @@ -2,8 +2,10 @@ package connectors import ( "context" + "time" "github.com/mimecast/dtail/internal/clients/handlers" + sessionspec "github.com/mimecast/dtail/internal/session" ) // Connector interface. @@ -14,4 +16,20 @@ type Connector interface { Server() string // Handler for the connection. Handler() handlers.Handler + // SupportsQueryUpdates reports whether the connected server advertised + // runtime query replacement support within the given timeout. + SupportsQueryUpdates(timeout time.Duration) bool + // ApplySessionSpec starts or updates the interactive session workload on an + // already connected server when query updates are supported. + ApplySessionSpec(spec sessionspec.Spec, timeout time.Duration) error + // ApplySessionSpecWithGeneration starts or updates the interactive session + // workload using the provided committed generation as the base for the + // session update command. + ApplySessionSpecWithGeneration(spec sessionspec.Spec, generation uint64, timeout time.Duration) error + // CommittedSession returns the last session spec and generation that the + // server acknowledged for this connection. + CommittedSession() (sessionspec.Spec, uint64, bool) + // RestoreCommittedSession resets the local committed session snapshot without + // advancing the generation. + RestoreCommittedSession(spec sessionspec.Spec, generation uint64, committed bool) } |
