net

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Shortcut Registry for build-in shortcut connections.
	Shortcut *shortcut

	// Concurency Estimate concurrency required.
	Concurrency = 100
)

Functions

func InitShortcut

func InitShortcut() *shortcut

Types

type MockConn

type MockConn struct {
	*mock.Conn
	// contains filtered or unexported fields
}

func NewMockConn

func NewMockConn(scn *ShortcutConn, idx int) *MockConn

func (*MockConn) Close

func (c *MockConn) Close() error

func (*MockConn) Invalid

func (c *MockConn) Invalid()

func (*MockConn) String

func (c *MockConn) String() string

type QueueAddr

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

func NewQueueAddr

func NewQueueAddr(addr string) *QueueAddr

func (*QueueAddr) Network

func (addr *QueueAddr) Network() string

func (*QueueAddr) Pop

func (addr *QueueAddr) Pop() string

func (*QueueAddr) Push

func (addr *QueueAddr) Push(a string)

func (*QueueAddr) String

func (addr *QueueAddr) String() string

type ShortcutConn

type ShortcutConn struct {
	Conns      []*MockConn
	Client     interface{}
	Address    string
	OnValidate func(*MockConn)
}

func NewShortcutConn

func NewShortcutConn(addr string, n int) *ShortcutConn

func (*ShortcutConn) Close

func (cn *ShortcutConn) Close(idxes ...int)

func (*ShortcutConn) Validate

func (cn *ShortcutConn) Validate(idxes ...int) *ShortcutConn

type StrAddr

type StrAddr string

func (StrAddr) Network

func (addr StrAddr) Network() string

func (StrAddr) String

func (addr StrAddr) String() string

Jump to

Keyboard shortcuts

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