microscope

package
v0.0.0-...-898cae1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryProbe

type BinaryProbe interface {
	Probe
	Write(value []byte)
	Value() []byte
}

type BooleanProbe

type BooleanProbe interface {
	Probe
	Write(value bool)
	Value() bool
}

type ByteProbe

type ByteProbe interface {
	Probe
	Write(value byte)
	Value() byte
}

type Context

type Context struct {
	Probes []Probe

	ProbeFactory ProbeFactory

	Stack Stack
}

type IntProbe

type IntProbe interface {
	Probe
	Write(value int)
	Value() int
}

type KeyPoint

type KeyPoint struct {
	Class   string
	Name    string
	Message string
}

KeyPoint 表示调用过程的一个关键点

type Probe

type Probe interface {
	Name() string
}

type ProbeFactory

type ProbeFactory interface {
	NewByteProbe(c *Context, name string) ByteProbe

	NewRuneProbe(c *Context, name string) RuneProbe

	NewStringProbe(c *Context, name string) StringProbe

	NewBinaryProbe(c *Context, name string) BinaryProbe

	NewIntProbe(c *Context, name string) IntProbe

	NewUint32Probe(c *Context, name string) Uint32Probe

	NewUint64Probe(c *Context, name string) Uint64Probe
}

type RuneProbe

type RuneProbe interface {
	Probe
	Write(value rune)
	Value() rune
}

type Stack

type Stack interface {
	Open(kp ...*KeyPoint) io.Closer
	Point(kp *KeyPoint)
}

Stack 表示一个调用过程的堆栈

func NewMockStack

func NewMockStack() Stack

NewMockStack 新建一个假冒的 stack

type StringProbe

type StringProbe interface {
	Probe
	Write(value string)
	Value() string
}

type Uint32Probe

type Uint32Probe interface {
	Probe
	Write(value uint32)
	Value() uint32
}

type Uint64Probe

type Uint64Probe interface {
	Probe
	Write(value uint64)
	Value() uint64
}

Jump to

Keyboard shortcuts

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