connmanager

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressesMap

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

AddressesMap -

func NewAddressesMap

func NewAddressesMap() *AddressesMap

NewAddressesMap constructs a new SyncMap

func (*AddressesMap) Delete

func (m *AddressesMap) Delete(k string)

Delete -

func (*AddressesMap) Get

func (m *AddressesMap) Get(k string) (*addressState, bool)

Get -

func (*AddressesMap) GetOrPut

func (m *AddressesMap) GetOrPut(k string, v *addressState) (*addressState, bool)

GetOrPut -

func (*AddressesMap) Put

func (m *AddressesMap) Put(k string, v *addressState)

Put -

func (*AddressesMap) Range

func (m *AddressesMap) Range(i func(k string, v *addressState) bool)

Range -

type ConnectionHandler

type ConnectionHandler func(*net.Connection) error

type ConnectionsMap

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

ConnectionsMap -

func NewConnectionsMap

func NewConnectionsMap() *ConnectionsMap

NewConnectionsMap constructs a new SyncMap

func (*ConnectionsMap) Delete

func (m *ConnectionsMap) Delete(k crypto.PublicKey)

Delete -

func (*ConnectionsMap) Get

func (m *ConnectionsMap) Get(k crypto.PublicKey) (*peerbox, bool)

Get -

func (*ConnectionsMap) GetOrPut

func (m *ConnectionsMap) GetOrPut(k crypto.PublicKey, v *peerbox) (*peerbox, bool)

GetOrPut -

func (*ConnectionsMap) Put

func (m *ConnectionsMap) Put(k crypto.PublicKey, v *peerbox)

Put -

func (*ConnectionsMap) Range

func (m *ConnectionsMap) Range(i func(k crypto.PublicKey, v *peerbox) bool)

Range -

type Manager

type Manager interface {
	GetConnection(
		context.Context,
		*peer.Peer,
	) (*net.Connection, error)
}

func New

Jump to

Keyboard shortcuts

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