mock

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 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 NetAddr

type NetAddr struct{}

NetAddr mock the net.Addr interface

func (NetAddr) Network

func (a NetAddr) Network() string

Network implements the net.Addr interface

func (NetAddr) String

func (a NetAddr) String() string

String implements the net.Addr interface

type NetworkEntity

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

NetworkEntity represents an network entity which can be used to construct the session object.

func NewNetworkEntity

func NewNetworkEntity() *NetworkEntity

NewNetworkEntity returns an mock network entity

func (*NetworkEntity) Close

func (n *NetworkEntity) Close() error

Close implements the session.NetworkEntity interface

func (*NetworkEntity) FindResponseByMID

func (n *NetworkEntity) FindResponseByMID(mid uint64) interface{}

FindResponseByMID returns the response respective the message id

func (*NetworkEntity) FindResponseByRoute

func (n *NetworkEntity) FindResponseByRoute(route string) interface{}

FindResponseByRoute returns the response respective the route

func (*NetworkEntity) Push

func (n *NetworkEntity) Push(route string, v interface{}) error

Push implements the session.NetworkEntity interface

func (*NetworkEntity) RPC

func (n *NetworkEntity) RPC(route string, v interface{}) error

RPC implements the session.NetworkEntity interface

func (*NetworkEntity) RemoteAddr

func (n *NetworkEntity) RemoteAddr() net.Addr

RemoteAddr implements the session.NetworkEntity interface

func (*NetworkEntity) Response

func (n *NetworkEntity) Response(route string, v interface{}) error

Response implements the session.NetworkEntity interface

Jump to

Keyboard shortcuts

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