NewRouter creates a new Router instance with the provided event factory function.
(eventFactory EventFactoryFunc[T])
| 51 | |
| 52 | // NewRouter creates a new Router instance with the provided event factory function. |
| 53 | func NewRouter[T hook.Resolver](eventFactory EventFactoryFunc[T]) *Router[T] { |
| 54 | return &Router[T]{ |
| 55 | RouterGroup: &RouterGroup[T]{}, |
| 56 | eventFactory: eventFactory, |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | // BuildMux constructs a new mux [http.Handler] instance from the current router configurations. |
| 61 | func (r *Router[T]) BuildMux() (http.Handler, error) { |
no outgoing calls
searching dependent graphs…