pushsend

package
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Overview

Package pushsend holds backd's built-in push senders: FCM (HTTP v1), APNs (HTTP/2, token authentication) and Web Push (VAPID, RFC 8291). Each answers one result per device for a delivery unit; the worker's job around them (limits, retries, pruning) is elsewhere.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Senders

func Senders(cfg Config) map[string]push.Sender

Senders returns the built-in senders by provider name.

Types

type Config

type Config struct {
	// Proxy is the egress proxy URL (EXECUTOR_PROXY) and EgressKey the key that signs the
	// token each unit presents to it. Without a proxy the senders dial the providers directly,
	// and only public addresses.
	Proxy     string
	EgressKey []byte
	Now       func() time.Time

	// Test hooks: the providers' addresses, and the roots that vouch for them.
	FCMBase   string // https://fcm.googleapis.com
	OAuthURL  string // the service account's token_uri
	APNsBase  string // https://api.push.apple.com
	APNsSand  string // https://api.sandbox.push.apple.com
	TLS       *tls.Config
	AllowAddr bool // dial private addresses directly (tests)
}

Config says how the senders reach the providers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL