recorder

package
v0.0.0-...-5c79d48 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New returns a events.SessionPreparerRecorder. If session recording is disabled, a recorder is returned that will discard all session events. If session recording is set to be synchronous, the returned recorder will use syncStream to create an event stream. Otherwise, a streamer will be used that will back recorded session events to disk for eventual upload.

Types

type Config

type Config struct {
	// SessionID defines the session to record.
	SessionID session.ID

	// ServerID is a server ID to write.
	ServerID string

	// Namespace is the session namespace.
	Namespace string

	// Clock is used to override time in tests.
	Clock clockwork.Clock

	// UID is UID generator.
	UID utils.UID

	// ClusterName defines the name of this teleport cluster.
	ClusterName string

	// RecordingCfg is a session recording config.
	RecordingCfg types.SessionRecordingConfig

	// SyncStreamer will be used to create session recording streams if
	// RecordingCfg specifies that session recording should be done
	// synchronously.
	SyncStreamer events.Streamer

	// DataDir is the directory that data should be stored in.
	DataDir string

	// Component is a component used for logging.
	Component string

	// Context is a context to cancel the writes
	// or any other operations.
	Context context.Context

	// MakeEvents converts bytes written via the io.Writer interface
	// into AuditEvents that are written to the stream.
	// For backwards compatibility, SessionWriter will convert bytes to
	// SessionPrint events when MakeEvents is not provided.
	MakeEvents func([]byte) []apievents.AuditEvent

	// BackoffTimeout is a backoff timeout
	// if set, failed audit write events will be lost
	// if session writer fails to write events after this timeout.
	BackoffTimeout time.Duration

	// BackoffDuration is a duration of the backoff before the next try.
	BackoffDuration time.Duration
}

Config configures a session recorder.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL