Movatterモバイル変換


[0]ホーム

URL:


sessionrecording

package
v1.92.3Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License:BSD-3-ClauseImports:22Imported by:1

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package sessionrecording contains functionality for recording Kubernetes APIserver proxy 'kubectl exec/attach' sessions.

Index

Constants

View Source
const (SPDYProtocolProtocol    = "SPDY"WSProtocolProtocol    = "WebSocket"ExecSessionTypeSessionType = "exec"AttachSessionTypeSessionType = "attach")

Variables

View Source
var (// CounterSessionRecordingsAttempted counts the number of session recording attempts.CounterSessionRecordingsAttempted =clientmetric.NewCounter("k8s_auth_proxy_session_recordings_attempted"))

Functions

This section is empty.

Types

typeHijacker

type Hijacker struct {http.ResponseWriter// contains filtered or unexported fields}

Hijacker implementsnet/http.Hijacker interface.It must be configured with an http request for a 'kubectl exec/attach' session thatneeds to be recorded. It knows how to hijack the connection and configure forthe session contents to be sent to a tsrecorder instance.

funcNewHijackeradded inv1.86.0

func NewHijacker(optsHijackerOpts) *Hijacker

func (*Hijacker)Hijack

func (h *Hijacker) Hijack() (net.Conn, *bufio.ReadWriter,error)

Hijack hijacks a 'kubectl exec/attach' session and configures for the sessioncontents to be sent to a recorder.

typeHijackerOpts

type HijackerOpts struct {TS          *tsnet.ServerReq         *http.RequestWhttp.ResponseWriterWho         *apitype.WhoIsResponseAddrs       []netip.AddrPortLog         *zap.SugaredLoggerPodstringNamespacestringFailOpenboolProtoProtocolSessionTypeSessionType}

typeProtocol

type Protocolstring

Protocol is the streaming protocol of the hijacked session. Supportedprotocols are SPDY and WebSocket.

typeRecorderDialFn

RecorderDialFn dials the specified netip.AddrPorts that should be tsrecorderaddresses. It tries to connect to recorder endpoints one by one, till oneconnection succeeds. In case of success, returns a list with a singlesuccessful recording attempt and an error channel. If the connection errorsafter having been established, an error is sent down the channel.

typeSessionTypeadded inv1.86.0

type SessionTypestring

SessionType is the type of session initiated with `kubectl`(`exec` or `attach`)

Source Files

View all Source files

Directories

PathSynopsis
Package fakes contains mocks used for testing 'kubectl exec' session recording functionality.
Package fakes contains mocks used for testing 'kubectl exec' session recording functionality.
Package spdy contains functionality for parsing SPDY streaming sessions.
Package spdy contains functionality for parsing SPDY streaming sessions.
Package tsrecorder contains functionality for connecting to a tsrecorder instance.
Package tsrecorder contains functionality for connecting to a tsrecorder instance.
package ws has functionality to parse 'kubectl exec/attach' sessions streamed using WebSocket protocol.
package ws has functionality to parse 'kubectl exec/attach' sessions streamed using WebSocket protocol.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp