telegram

package
v0.0.0-...-e8355e7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DistName = "telegram"
)
View Source
const InvitationRequestDayLimit int = 7

Variables

This section is empty.

Functions

func GetLoxInvitation

func GetLoxInvitation(loxserver string) ([]byte, error)

Types

type IdFreshnessError

type IdFreshnessError struct {
}

func (*IdFreshnessError) Error

func (e *IdFreshnessError) Error() string

type InvitationLimitError

type InvitationLimitError struct {
	ClaimTime time.Time
}

func (*InvitationLimitError) Error

func (e *InvitationLimitError) Error() string

type LoxRequestError

type LoxRequestError struct {
	Err string
}

func (*LoxRequestError) Error

func (e *LoxRequestError) Error() string

type TelegramDistributor

type TelegramDistributor struct {

	// NewBridgesStore maps each updater to it's persistence mechanism
	NewBridgesStore map[string]persistence.Mechanism
	// IdStore creates a persistence mechanism for seen IDs
	IdStore persistence.Mechanism
	// contains filtered or unexported fields
}

func (*TelegramDistributor) GetInvitation

func (d *TelegramDistributor) GetInvitation(id int64) ([]byte, error)

func (*TelegramDistributor) GetResources

func (d *TelegramDistributor) GetResources(id int64) []core.Resource

func (*TelegramDistributor) Init

func (d *TelegramDistributor) Init(cfg *internal.Config)

func (*TelegramDistributor) LoadNewBridges

func (d *TelegramDistributor) LoadNewBridges(name string, r io.Reader) error

LoadNewBridges loads bridges in bridgesJSON format from the reader into the new bridges newHashring

This function locks a mutex when accessing the newHashring, we should be careful to don't make a deadlock with the internal mutex in the hashring. Never call this function while holding the newHashring mutex.

func (*TelegramDistributor) Shutdown

func (d *TelegramDistributor) Shutdown()

Jump to

Keyboard shortcuts

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