telegram_push_message_svc

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnqueueMessageWL added in v1.2.0

func EnqueueMessageWL(message tptypes.QueueMessage)

func GetSilentPatternsByChatIdRL added in v1.4.0

func GetSilentPatternsByChatIdRL(chatID int64) map[string]time.Time

func RemoveSilencePatternWL added in v1.4.0

func RemoveSilencePatternWL(chatID int64, pattern string) error

func SetSilencePatternWL added in v1.4.0

func SetSilencePatternWL(chatID int64, pattern string, duration time.Duration) (update bool, err error)

func ShouldSendMessageWL

func ShouldSendMessageWL(_case PreventSpammingCase, identities []string, ignoreIfLastSentLessThan time.Duration) (shouldSendToIdentities []string)

func StartTelegramPusherService added in v1.2.0

func StartTelegramPusherService(appCtx config.AppContext)

Types

type PreventSpammingCase

type PreventSpammingCase int8
const (
	PreventSpammingCaseTomeStoned PreventSpammingCase = iota
	PreventSpammingCaseJailed
	PreventSpammingCaseLowUptime
	PreventSpammingCaseMissedBlocksOverDangerousThreshold
	PreventSpammingCaseDirectHealthCheckOptionalRPC
	PreventSpammingCaseHealthCheckManagedRPC
	PreventSpammingCaseNotVotedGovernance
)

type ReceiverBasedQueue

type ReceiverBasedQueue interface {
	EnqueueMessageWL(types.QueueMessage)
	AnyPendingMessageRL() bool
	GetQueueInfoRL() (receiver int64, isReceiverPriority bool, size int, lastEnqueueUTC time.Time)
	DequeueMessagesWL(size int) []types.QueueMessage
	GetReceiverId() int64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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