transport

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAddressParser

func AddAddressParser(addressParser AddressParser)

AddAddressParser adds an AddressParser to the globally-configured address parsers.

Types

type Address

type Address interface {
	Dial(name string, i *identity.TokenId, timeout time.Duration, tcfg Configuration) (Connection, error)
	Listen(name string, i *identity.TokenId, incoming chan Connection, tcfg Configuration) (io.Closer, error)
	MustListen(name string, i *identity.TokenId, incoming chan Connection, tcfg Configuration) io.Closer
	String() string
}

Address implements the functionality provided by a generic "address".

func ParseAddress

func ParseAddress(addressString string) (Address, error)

ParseAddress uses the globally-configured AddressParser instances to parse an address.

type AddressParser

type AddressParser interface {
	Parse(addressString string) (Address, error)
}

AddressParser implements the functionality provided by an "address parser".

type Configuration added in v0.11.17

type Configuration map[interface{}]interface{}

type Connection

type Connection interface {
	Detail() *ConnectionDetail
	PeerCertificates() []*x509.Certificate
	Reader() io.Reader
	Writer() io.Writer
	Conn() net.Conn
	SetReadTimeout(t time.Duration) error
	ClearReadTimeout() error
	SetWriteTimeout(t time.Duration) error
	ClearWriteTimeout() error
	io.Closer
}

Connection represents an abstract connection (ingress or egress).

type ConnectionDetail

type ConnectionDetail struct {
	Address string
	InBound bool
	Name    string
}

func (*ConnectionDetail) String

func (cd *ConnectionDetail) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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