add weight for tunnel connector
This commit is contained in:
@ -40,6 +40,10 @@ func (c *tunnelConnector) parseMetadata(md mdata.Metadata) (err error) {
|
||||
c.md.tunnelID = relay.NewTunnelID(uuid[:])
|
||||
}
|
||||
|
||||
if weight := mdutil.GetInt(md, "tunnel.weight"); weight > 0 {
|
||||
c.md.tunnelID = c.md.tunnelID.SetWeight(uint8(weight))
|
||||
}
|
||||
|
||||
c.md.muxCfg = &mux.Config{
|
||||
Version: mdutil.GetInt(md, "mux.version"),
|
||||
KeepAliveInterval: mdutil.GetDuration(md, "mux.keepaliveInterval"),
|
||||
|
Reference in New Issue
Block a user