Documentation ¶
Index ¶
Constants ¶
View Source
const ( RpcTLS = "RPCTLS" Raft = "RAFT" Mesh = "MESH" Registered = "REG" )
known stream types.
Variables ¶
View Source
var ( ErrMissingServFunc = errors.New("Proto struct is missing serv function") ErrMissingName = errors.New("Proto needs a name") ErrAlreadyExists = errors.New("Proto already exists") ErrBadVersions = errors.New("Mux version unsupported") ErrProtoUnsupported = errors.New("Proto not supported") ErrNoProto = errors.New("Add must have a proto") )
View Source
var MuxVersionName = map[MuxVersion]string{ UnknownVersion: "unknown", Mux_v1: "Mux_v1", Mux_v2: "Mux_v2", }
View Source
var (
SprotoSw = make(map[MuxVersion]map[string]*Sproto)
)
Functions ¶
func Add ¶
func Add(ver MuxVersion, proto *Sproto) error
add a new stream type to the 'proto-switch' or override default handlers.
Types ¶
type MuxVersion ¶
type MuxVersion uint8
const ( UnknownVersion MuxVersion = iota Mux_v1 Mux_v2 )
func (MuxVersion) String ¶
func (mv MuxVersion) String() string
Click to show internal directories.
Click to hide internal directories.