Documentation
¶
Index ¶
Constants ¶
const DefaultBasePath = "/_frame/queue"
DefaultBasePath is the reserved mux path for queue push delivery.
Variables ¶
This section is empty.
Functions ¶
func HTTPStatusFor ¶
HTTPStatusFor maps processing errors to HTTP status codes for push delivery.
Types ¶
type AuthMode ¶
type AuthMode string
AuthMode is the push endpoint authentication mode.
func ParseAuthMode ¶
ParseAuthMode normalizes a config string to AuthMode.
type Authenticator ¶
Authenticator validates push HTTP requests.
type BearerAuth ¶
type BearerAuth struct {
Token string
}
BearerAuth checks Authorization: Bearer <token> with constant-time compare.
func (BearerAuth) Authenticate ¶
func (b BearerAuth) Authenticate(r *http.Request) error
type Config ¶
type Config struct {
BasePath string
Auth Authenticator
TrustClaims bool
AckPoison bool
MaxBodyBytes int64
// HandlerTimeout bounds the delivery context. Zero means no timeout —
// queue consumers process until the handler returns (background work).
HandlerTimeout time.Duration
// ProtocolOverride forces a codec; empty uses subscriber URL query or auto.
ProtocolOverride string
}
Config configures the multiplexing push handler.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler demultiplexes POST /{base}/{ref} to registered push subscribers.
func NewHandler ¶
func NewHandler(lookup queue.PushLookup, cfg Config) *Handler
NewHandler builds a push multiplexing handler.
type OIDCAuth ¶
type OIDCAuth struct {
// contains filtered or unexported fields
}
OIDCAuth validates Google OIDC bearer tokens for Cloud Tasks push.
func NewOIDCAuth ¶
func NewOIDCAuth(ctx context.Context, cfg OIDCConfig) *OIDCAuth
NewOIDCAuth creates an OIDC authenticator and starts JWKS refresh.
type OIDCConfig ¶
type OIDCConfig struct {
Audience string
Issuers []string
JWKSURL string
JWKSRefresh time.Duration
}
OIDCConfig configures dedicated Google-oriented push OIDC validation.
func GoogleCloudTasksOIDCPreset ¶
func GoogleCloudTasksOIDCPreset(audience string) OIDCConfig
GoogleCloudTasksOIDCPreset returns defaults for Cloud Tasks OIDC tokens.