Skip to content

Commit 91c5c12

Browse files
committed
router: types
1 parent f8feb8b commit 91c5c12

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

router.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package godzilla
2+
3+
import "sync"
4+
5+
var (
6+
defaultContentType = []byte("text/plain; charset=utf-8")
7+
)
8+
9+
type router struct {
10+
trees map[string]*node
11+
cache map[string]*matchResult
12+
cacheLen int
13+
mutex sync.RWMutex
14+
notFound handlersChain
15+
settings *Settings
16+
pool sync.Pool
17+
}
18+
19+
type matchResult struct {
20+
handlers handlersChain
21+
params map[string]string
22+
}

0 commit comments

Comments
 (0)