App denotes the Fiber application. App is safe for concurrent use, except for route mutation methods that explicitly document otherwise.
| 74 | // App is safe for concurrent use, except for route mutation methods that |
| 75 | // explicitly document otherwise. |
| 76 | type App struct { |
| 77 | // App config |
| 78 | config Config |
| 79 | // Indicates if the value was explicitly configured |
| 80 | configured Config |
| 81 | // Ctx pool |
| 82 | pool sync.Pool |
| 83 | // Fasthttp server |
| 84 | server *fasthttp.Server |
| 85 | // Converts string to a byte slice |
| 86 | toBytes func(s string) (b []byte) |
| 87 | // Converts byte slice to a string |
| 88 | toString func(b []byte) string |
| 89 | // Hooks |
| 90 | hooks *Hooks |
| 91 | // Latest route & group |
| 92 | latestRoute *Route |
| 93 | // newCtxFunc |
| 94 | newCtxFunc func(app *App) CustomCtx |
| 95 | // TLS handler |
| 96 | tlsHandler *TLSHandler |
| 97 | // Mount fields |
| 98 | mountFields *mountFields |
| 99 | // state management |
| 100 | state *State |
| 101 | // shared state management (prefork-safe, storage-backed) |
| 102 | sharedState *SharedState |
| 103 | // Route stack divided by HTTP methods |
| 104 | stack [][]*Route |
| 105 | // customConstraints is a list of external constraints |
| 106 | customConstraints []CustomConstraint |
| 107 | // sendfiles stores configurations for handling ctx.SendFile operations |
| 108 | sendfiles []*sendFileStore |
| 109 | // custom binders |
| 110 | customBinders []CustomBinder |
| 111 | // Route stack divided by HTTP methods and route prefixes |
| 112 | treeStack []map[int][]*Route |
| 113 | // sendfilesMutex is a mutex used for sendfile operations |
| 114 | sendfilesMutex sync.RWMutex |
| 115 | mutex sync.Mutex |
| 116 | // Amount of registered handlers |
| 117 | handlersCount uint32 |
| 118 | // contains the information if the route stack has been changed to build the optimized tree |
| 119 | hasRoutesRefreshed bool |
| 120 | // hasCustomCtx tracks whether app uses a custom context implementation |
| 121 | hasCustomCtx bool |
| 122 | } |
| 123 | |
| 124 | type viewsLockKey struct { |
| 125 | typ reflect.Type |
nothing calls this directly
no outgoing calls
no test coverage detected