Documentation ¶
Index ¶
Constants ¶
View Source
const HandlerTimeout = 5 * time.Second
HandlerTimeout should be used as the value in all timeout middleware, and as the base value to calculate http.Server timeouts from.
Variables ¶
View Source
var ErrTenantNotFound = errors.New("not found")
Functions ¶
Types ¶
type MultiTenantHandler ¶
type MultiTenantHandler struct {
// contains filtered or unexported fields
}
func NewMultiTenantHandler ¶
func NewMultiTenantHandler(logger *slog.Logger, newTenant NewTenantFunc) *MultiTenantHandler
func (*MultiTenantHandler) ServeHTTP ¶
func (h *MultiTenantHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.