From: Eric Wong Date: Wed, 7 May 2025 00:16:34 +0000 (+0000) Subject: rename PlackLimiter to PsgiLimiter X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2953fc2b1249d4d646a80ff887c67f419da593b6;p=thirdparty%2Fpublic-inbox.git rename PlackLimiter to PsgiLimiter `PSGI' is probably a appropriate name since it's the name of the interface, and `Plack' is merely the implementation of it. --- diff --git a/MANIFEST b/MANIFEST index bc1a92784..674b544ca 100644 --- a/MANIFEST +++ b/MANIFEST @@ -328,7 +328,7 @@ lib/PublicInbox/OverIdx.pm lib/PublicInbox/POP3.pm lib/PublicInbox/POP3D.pm lib/PublicInbox/PktOp.pm -lib/PublicInbox/PlackLimiter.pm +lib/PublicInbox/PsgiLimiter.pm lib/PublicInbox/Qspawn.pm lib/PublicInbox/Reply.pm lib/PublicInbox/RepoAtom.pm diff --git a/lib/PublicInbox/PlackLimiter.pm b/lib/PublicInbox/PsgiLimiter.pm similarity index 91% rename from lib/PublicInbox/PlackLimiter.pm rename to lib/PublicInbox/PsgiLimiter.pm index 480392121..32c7c2bfc 100644 --- a/lib/PublicInbox/PlackLimiter.pm +++ b/lib/PublicInbox/PsgiLimiter.pm @@ -1,7 +1,7 @@ # Copyright (C) all contributors # License: GPL-3.0+ # generic Plack/PSGI middleware to expose PublicInbox::Limiter, (see __END__) -package PublicInbox::PlackLimiter; +package PublicInbox::PsgiLimiter; use v5.12; use parent qw(Plack::Middleware); use PublicInbox::Limiter; @@ -60,7 +60,7 @@ __END__ =head1 NAME -PublicInbox::PlackLimiter - limit concurrency to parts of a PSGI app +PublicInbox::PsgiLimiter - limit concurrency to parts of a PSGI app =head1 SYNOPSIS @@ -69,12 +69,12 @@ PublicInbox::PlackLimiter - limit concurrency to parts of a PSGI app builder { # by default, only 2 requests may be processed at once: - enable '+PublicInbox::PlackLimiter'; + enable '+PublicInbox::PsgiLimiter'; # You will likely only want to limit certain expensive endpoints, # while allowing maximum concurrency for inexpensive endpoints. # You can do that by passing a `match_cb' parameter: - enable '+PublicInbox::PlackLimiter', + enable '+PublicInbox::PsgiLimiter', # some expensive endpoints for my public-inbox instance, YMMV match_cb => sub { my ($env) = @_; @@ -96,7 +96,7 @@ PublicInbox::PlackLimiter - limit concurrency to parts of a PSGI app =head1 DESCRIPTION -PublicInbox::PlackLimiter lets a sysadmin limit concurrency to certain +PublicInbox::PsgiLimiter lets a sysadmin limit concurrency to certain expensive endpoints while allowing the normal concurrency level of the server to run inexpensive requests.