Documentation
¶
Index ¶
- Constants
- func GetLoxInvitation(loxserver string) ([]byte, error)
- type IdFreshnessError
- type InvitationLimitError
- type LoxRequestError
- type TelegramDistributor
- func (d *TelegramDistributor) GetInvitation(id int64) ([]byte, error)
- func (d *TelegramDistributor) GetResources(id int64, lang string) []core.Resource
- func (d *TelegramDistributor) Init(cfg *internal.Config)
- func (d *TelegramDistributor) LoadNewBridges(name string, r io.Reader) error
- func (d *TelegramDistributor) Shutdown()
Constants ¶
View Source
const (
DistName = "telegram"
)
View Source
const InvitationRequestDayLimit int = 7
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IdFreshnessError ¶
type IdFreshnessError struct { }
func (*IdFreshnessError) Error ¶
func (e *IdFreshnessError) Error() string
type InvitationLimitError ¶
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, lang string) []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()
Click to show internal directories.
Click to hide internal directories.