logger

package
v0.0.0-...-3751135 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartSessionLog

func StartSessionLog(log SessionLogger, format string) error

Types

type AsciicastLogger

type AsciicastLogger struct {
	SessionLogger
}

func (*AsciicastLogger) Start

func (l *AsciicastLogger) Start() (err error)

type Logger

type Logger struct {
	ClientIn  io.Reader
	ClientOut io.WriteCloser
	ServerIn  io.WriteCloser
	ServerOut io.Reader

	Username string
	Hostname string
	SessId   []byte

	RootFolder string
}

type PcapWriter

type PcapWriter struct {
	*pcapgo.NgWriter
	Src     net.IP
	Dst     net.IP
	SrcPort uint16
	DstPort uint16
	SentSrc *uint32
	SentDst *uint32
}

func (PcapWriter) Close

func (pw PcapWriter) Close() error

func (PcapWriter) Write

func (pw PcapWriter) Write(p []byte) (n int, err error)

type SessionLogger

type SessionLogger struct {
	Logger

	ClientErr io.Writer
	ServerErr io.Reader
	PTY       bool
	PTYCols   uint32
	PTYRows   uint32
	Command   string
}

type SudoreplayLogger

type SudoreplayLogger struct {
	SessionLogger
	// contains filtered or unexported fields
}

func (*SudoreplayLogger) Start

func (sl *SudoreplayLogger) Start() (err error)

type TCPLogger

type TCPLogger struct {
	Logger
	Src     net.IP
	Dst     net.IP
	SrcPort uint16
	DstPort uint16
	SentSrc uint32
	SentDst uint32
}

func (*TCPLogger) Start

func (tl *TCPLogger) Start() (err error)

type Timer

type Timer struct {
	time.Time
	sync.Mutex
}

func (*Timer) GetDiff

func (t *Timer) GetDiff() time.Duration

func (*Timer) Init

func (t *Timer) Init()

type TimingWriter

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

func (TimingWriter) Close

func (tw TimingWriter) Close() error

func (TimingWriter) Write

func (tw TimingWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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