desktop

package
v1.2.3-fred.11 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Player

type Player struct {
	// contains filtered or unexported fields
}

Player manages the playback of a recorded desktop session. It streams events from the audit log to the browser over a websocket connection.

func NewPlayer

func NewPlayer(sID string, ws *websocket.Conn, streamer Streamer, log logrus.FieldLogger) *Player

NewPlayer creates a player that streams a desktop session over the provided websocket connection.

func (*Player) Play

func (pp *Player) Play(ctx context.Context)

Play kicks off goroutines for receiving actions and playing back the session over the websocket, and then waits for the stream to complete.

type Streamer

type Streamer interface {
	// StreamSessionEvents streams all events from a given session recording. An error is returned on the first
	// channel if one is encountered. Otherwise the event channel is closed when the stream ends.
	// The event channel is not closed on error to prevent race conditions in downstream select statements.
	StreamSessionEvents(ctx context.Context, sessionID session.ID, startIndex int64) (chan apievents.AuditEvent, chan error)
}

Streamer is the interface that can provide with a stream of events related to a particular session.

Jump to

Keyboard shortcuts

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