sessions

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SESSION_FILE_VERSION = 1
)

Variables

This section is empty.

Functions

func EnsureDirectory added in v0.1.1

func EnsureDirectory(path string) error

EnsureDirectory creates a directory if it does not exist and checks whether other users can read and write files in it.

func GetFilename added in v0.1.1

func GetFilename(dataDir string, path string) (string, error)

Types

type Event

type Event struct {
	Stamp   time.Time
	Message P.Message
}

type Recorder

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

func NewRecorder

func NewRecorder(ctx context.Context, filename string, stream stream.Stream) (*Recorder, error)

func (*Recorder) Events

func (s *Recorder) Events() []Event

func (*Recorder) Read

func (s *Recorder) Read(p []byte) (n int, err error)

func (*Recorder) Resize

func (s *Recorder) Resize(size stream.Size) error

func (*Recorder) Write

func (s *Recorder) Write(data []byte) (n int, err error)

type SessionReader added in v0.1.1

type SessionReader interface {
	Read() (Event, error)
}

func Open added in v0.1.1

func Open(filename string) (SessionReader, error)

type SessionWriter added in v0.1.1

type SessionWriter interface {
	Write(event Event) error
	Close() error
}

func Create added in v0.1.1

func Create(filename string) (SessionWriter, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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