mock

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerFinder

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

todo: implement peer registry mocks, export appropriate interface and move those in libp2p so it can be used in handshake

func (*PeerFinder) Exists

func (p *PeerFinder) Exists(overlay swarm.Address) (found bool)

func (*PeerFinder) SetFound

func (p *PeerFinder) SetFound(found bool)

type Stream

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

func NewStream

func NewStream(readBuffer, writeBuffer *bytes.Buffer) *Stream

func (*Stream) Close

func (s *Stream) Close() error

func (*Stream) FullClose

func (s *Stream) FullClose() error

func (*Stream) Headers

func (s *Stream) Headers() p2p.Headers

func (*Stream) Read

func (s *Stream) Read(p []byte) (n int, err error)

func (*Stream) Reset

func (s *Stream) Reset() error

func (*Stream) ResponseHeaders

func (s *Stream) ResponseHeaders() p2p.Headers

func (*Stream) SetReadErr

func (s *Stream) SetReadErr(err error, checkmark int)

func (*Stream) SetWriteErr

func (s *Stream) SetWriteErr(err error, checkmark int)

func (*Stream) Write

func (s *Stream) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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