// NewTableRouter returns a table router
NewTableRouter returns a table router
// NewTableRouter returns a table router
func NewTableRouter(rules []*TableRule) (*Table, error) {
	r := &Table{
		Selector: selector.NewTrieSelector(),
	}
	for _, rule := range rules {
		if err := r.AddRule(rule); err != nil {
			return nil, errors.Annotatef(err, "initial rule %+v in table router", rule)
		}
	}
	return r, nil
}
func NewTableRouter ( rules [ ] * TableRule ) ( * Table , error ) { r := & Table { Selector : selector . NewTrieSelector ( ) , } for _ , rule := range rules { if err := r . AddRule ( rule ) ; err != nil { return nil , errors . Annotatef ( err , " " , rule ) } } return r , nil }
NewTableRouter returns a table router
NewTableRouter returns a table router