inet

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fake

type Fake struct {
	ListenStub func(protocol, laddr string) (net.Listener, error)
	// contains filtered or unexported fields
}

Fake ...

func NewFake

func NewFake() *Fake

NewFake is the preferred way to initialise a Fake

func (*Fake) Invocations

func (fake *Fake) Invocations() map[string][][]interface{}

Invocations ...

func (*Fake) Listen

func (fake *Fake) Listen(protocol string, laddr string) (net.Listener, error)

Listen ...

func (*Fake) ListenArgsForCall

func (fake *Fake) ListenArgsForCall(i int) (string, string)

ListenArgsForCall ...

func (*Fake) ListenCallCount

func (fake *Fake) ListenCallCount() int

ListenCallCount ...

func (*Fake) ListenReturns

func (fake *Fake) ListenReturns(result1 net.Listener, result2 error)

ListenReturns ...

type ListenerFake

type ListenerFake struct {
	AcceptStub func() (net.Conn, error)

	CloseStub func() error

	AddrStub func() net.Addr
	// contains filtered or unexported fields
}

ListenerFake ...

func NewListenerFake

func NewListenerFake() *ListenerFake

NewListenerFake is the preferred way to initialise a ListenerFake

func (*ListenerFake) Accept

func (fake *ListenerFake) Accept() (net.Conn, error)

Accept ...

func (*ListenerFake) AcceptCallCount

func (fake *ListenerFake) AcceptCallCount() int

AcceptCallCount ...

func (*ListenerFake) AcceptReturns

func (fake *ListenerFake) AcceptReturns(result1 net.Conn, result2 error)

AcceptReturns ...

func (*ListenerFake) Addr

func (fake *ListenerFake) Addr() net.Addr

Addr ...

func (*ListenerFake) AddrCallCount

func (fake *ListenerFake) AddrCallCount() int

AddrCallCount ...

func (*ListenerFake) AddrReturns

func (fake *ListenerFake) AddrReturns(result1 net.Addr)

AddrReturns ...

func (*ListenerFake) Close

func (fake *ListenerFake) Close() error

Close ...

func (*ListenerFake) CloseCallCount

func (fake *ListenerFake) CloseCallCount() int

CloseCallCount ...

func (*ListenerFake) CloseReturns

func (fake *ListenerFake) CloseReturns(result1 error)

CloseReturns ...

func (*ListenerFake) Invocations

func (fake *ListenerFake) Invocations() map[string][][]interface{}

Invocations ...

type Net

type Net interface {
	Listen(protocol, laddr string) (net.Listener, error)
}

Net is an interface around net

type Real

type Real struct{}

Real is a wrapper around net that implements inet.Net

func New

func New() *Real

New creates a struct that behaves like the os package

func (*Real) Listen

func (*Real) Listen(protocol, laddr string) (net.Listener, error)

Listen is a wrapper around net.Listen()

Jump to

Keyboard shortcuts

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