util

package
v0.0.0-...-52daa1a Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotifyUserCountsAsync

func NotifyUserCountsAsync(ctx context.Context, pgClient pushgateway.Client, localpart string, serverName spec.ServerName, db storage.UserDatabase) error

NotifyUserCountsAsync sends notifications to a local user's notification destinations. UserDatabase lookups run synchronously, but a single goroutine is started when talking to the Push gateways. There is no way to know when the background goroutine has finished.

Types

type PusherDevice

type PusherDevice struct {
	Device pushgateway.Device
	Pusher *api.Pusher
	URL    string
	Format string
}

func GetPushDevices

func GetPushDevices(ctx context.Context, localpart string, serverName spec.ServerName, tweaks map[string]interface{}, db storage.UserDatabase) ([]*PusherDevice, error)

GetPushDevices pushes to the configured devices of a local user.

Jump to

Keyboard shortcuts

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