net

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 5 Imported by: 0

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 = 1000
)

Functions

func InitShortcut

func InitShortcut() *shortcut

Types

type MockConn

type MockConn struct {
	Server *MockEnd
	Client *MockEnd
	// contains filtered or unexported fields
}

func NewMockConn

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

func (*MockConn) Close

func (c *MockConn) Close() error

func (*MockConn) String

func (c *MockConn) String() string

type MockEnd

type MockEnd struct {
	*mock.End
	// contains filtered or unexported fields
}

func (*MockEnd) Close

func (c *MockEnd) Close() (err error)

func (*MockEnd) CloseWithReason

func (c *MockEnd) CloseWithReason(reason string) (err error)

func (*MockEnd) Status

func (c *MockEnd) Status() string

func (*MockEnd) String

func (c *MockEnd) 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)
	// contains filtered or unexported fields
}

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