trace

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQueueDirReader

func NewQueueDirReader(q *Queue, dir Dir) io.Reader

func NewTraceDirReader

func NewTraceDirReader(r *Reader, dir Dir) io.Reader

func NewTracer

func NewTracer(tw io.Writer, rw io.ReadWriter) io.ReadWriter

Types

type Dir

type Dir byte
const (
	DirIn Dir = iota
	DirOut
)

func (Dir) MarshalText

func (d Dir) MarshalText() ([]byte, error)

func (*Dir) UnmarshalText

func (d *Dir) UnmarshalText(text []byte) error

type Msg

type Msg struct {
	Dir  Dir
	TS   uint
	Data []byte
}

func (Msg) MarshalText

func (m Msg) MarshalText() ([]byte, error)

func (*Msg) UnmarshalText

func (m *Msg) UnmarshalText(text []byte) error

type Queue

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

func (*Queue) Dequeue

func (q *Queue) Dequeue() *Msg

func (*Queue) DequeueDir

func (q *Queue) DequeueDir(dir Dir) *Msg

func (*Queue) Enqueue

func (q *Queue) Enqueue(msg *Msg)

func (*Queue) Head

func (q *Queue) Head() *Msg

type Reader

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

func NewReader

func NewReader(r io.Reader) *Reader

func (*Reader) ReadMsg

func (r *Reader) ReadMsg(m *Msg) error

type Writer

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

func NewWriter

func NewWriter(w io.Writer) *Writer

func (*Writer) WriteMsg

func (w *Writer) WriteMsg(m *Msg) error

Jump to

Keyboard shortcuts

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