Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuffersWriter ¶
BuffersWriter defines writev for optimized syscall
type Factory ¶
type Factory interface { // Schemes supported schemes. Schemes() Schemes // Connect to the peer with the specified address. Connect(options *Options) (Transport, error) // Listen for an address and accept the connection request. Listen(options *Options) (Acceptor, error) }
Factory defines transport factory
type Option ¶
Option defines option function
func WithAttachment ¶ added in v1.2.0
func WithAttachment(attachment interface{}) Option
WithAttachment a data associated with the Channel
func WithContext ¶
WithContext to hold other configure pass by context.WithValue
type Options ¶
type Options struct { // In server side: listen address. // In client side: connect address. Address *url.URL // Other configure pass by context.WithValue Context context.Context // Attachment defines the object or data associated with the Channel Attachment interface{} }
Options for transport
func ParseOptions ¶
ParseOptions parse options
func (*Options) AddressWithoutHost ¶
AddressWithoutHost convert host:port to :port
type Schemes ¶
type Schemes []string
Schemes to define scheme list
Click to show internal directories.
Click to hide internal directories.