Documentation ¶
Index ¶
- type Trie
- func (r *Trie) Delete(uri route.Uri) bool
- func (r *Trie) EachNodeWithPool(f func(*Trie))
- func (r *Trie) EndpointCount() int
- func (r *Trie) Find(uri route.Uri) *route.EndpointPool
- func (r *Trie) Insert(uri route.Uri, value *route.EndpointPool) *Trie
- func (r *Trie) MatchUri(uri route.Uri) *route.EndpointPool
- func (r *Trie) PoolCount() int
- func (r *Trie) PruneDeadLeaves()
- func (r *Trie) Snip()
- func (r *Trie) ToMap() map[route.Uri]*route.EndpointPool
- func (r *Trie) ToPath() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Trie ¶
type Trie struct { Segment string Pool *route.EndpointPool ChildNodes map[string]*Trie Parent *Trie }
package name inspired by golang package that includes heap, list and ring.
func (*Trie) EachNodeWithPool ¶
func (*Trie) EndpointCount ¶
func (*Trie) Find ¶
func (r *Trie) Find(uri route.Uri) *route.EndpointPool
Find returns a *route.EndpointPool that matches exactly the URI parameter, nil if no match was found.
func (*Trie) MatchUri ¶
func (r *Trie) MatchUri(uri route.Uri) *route.EndpointPool
MatchUri returns the longest route that matches the URI parameter and has endpoints, nil if nothing matches.
func (*Trie) PruneDeadLeaves ¶
func (r *Trie) PruneDeadLeaves()
Click to show internal directories.
Click to hide internal directories.