fastmock

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTP_SERVER = "HTTP_SERVER"
	GRPC_SERVER = "GRPC_SERVER"
)

Variables

This section is empty.

Functions

func MockSyscall

func MockSyscall()

MockSyscall mock conn

func MockTime

func MockTime()

MockTime mock Time

Types

type ISockets

type ISockets interface {
	Set(fd int, remoteAddr string, accessTime time.Time)
	Get(fd int) *Socket
	Access(fd int)
	Remove(fd int)
}

ISockets interface

func NewSockets

func NewSockets() ISockets

NewSockets New

type IThreads

type IThreads interface {
	Set(threadID int64, traceID string, replayTime int64)
	Get(threadID int64) *Thread
	Access(threadID int64)
	Recycle()
}

IThreads interface

var ReplayerGlobalThreads IThreads

global goroutine manager

func NewThreads

func NewThreads() IThreads

NewThreads new Threads

type Socket

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

Socket Socket

type Sockets

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

Sockets Sockets

func (*Sockets) Access

func (s *Sockets) Access(fd int)

Access Access

func (*Sockets) Get

func (s *Sockets) Get(fd int) *Socket

Get Get

func (*Sockets) Remove

func (s *Sockets) Remove(fd int)

Remove Remove

func (*Sockets) Set

func (s *Sockets) Set(fd int, remoteAddr string, accessTime time.Time)

Set Set

type Thread

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

Thread Thread

type Threads

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

Threads Threads

func (*Threads) Access

func (t *Threads) Access(threadID int64)

Access Access

func (*Threads) Get

func (t *Threads) Get(threadID int64) *Thread

Get Get

func (*Threads) Recycle

func (t *Threads) Recycle()

Recycle GC

func (*Threads) Set

func (t *Threads) Set(threadID int64, traceID string, replayTime int64)

Set Set

Jump to

Keyboard shortcuts

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