transportmux

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package transportmux wraps a transport.{Connecter,AuthenticatedListener} to distinguish different connection types based on a label sent from client to server on connection establishment.

Labels are plain text and fixed length.

Index

Constants

View Source
const LabelLen = 64

Exact length of a label in bytes (0-byte padded if it is shorter). This is a protocol constant, changing it breaks the wire protocol.

Variables

This section is empty.

Functions

func Demux

func MuxConnecter

func MuxConnecter(rawConnecter transport.Connecter, labels []string, timeout time.Duration) (map[string]transport.Connecter, error)

func WithLogger

func WithLogger(ctx context.Context, log Logger) context.Context

Types

type Logger

type Logger = logger.Logger

Jump to

Keyboard shortcuts

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