utils

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: AGPL-3.0-or-later Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDomainFromEmail

func GetDomainFromEmail(email string) (string, error)

GetDomainFromEmail returns the domain part as defined in RFC 5322 of the provided email address.

Types

type AtomicBool

type AtomicBool int32

func (*AtomicBool) CompareFalseAndSetTrue added in v0.2.0

func (b *AtomicBool) CompareFalseAndSetTrue() bool

func (*AtomicBool) CompareTrueAndSetFalse added in v0.2.0

func (b *AtomicBool) CompareTrueAndSetFalse() bool

func (*AtomicBool) IsSet

func (b *AtomicBool) IsSet() bool

func (*AtomicBool) SetFalse

func (b *AtomicBool) SetFalse()

func (*AtomicBool) SetTrue

func (b *AtomicBool) SetTrue()

type Broadcaster added in v0.2.0

type Broadcaster struct {
	// contains filtered or unexported fields
}

A Broadcaster is a implementation of channels where clients can subscribe and unsubscribe to messages. Messages published to the Broadcaster are sent to all subcribers.

func NewBroadcaster added in v0.2.0

func NewBroadcaster() *Broadcaster

func (*Broadcaster) Broadcast added in v0.2.0

func (b *Broadcaster) Broadcast(msg interface{})

func (*Broadcaster) SetBufferSize added in v0.2.0

func (b *Broadcaster) SetBufferSize(bufferSize int)

func (*Broadcaster) Start added in v0.2.0

func (b *Broadcaster) Start(ctx context.Context)

func (*Broadcaster) Stop added in v0.2.0

func (b *Broadcaster) Stop()

func (*Broadcaster) Subscribe added in v0.2.0

func (b *Broadcaster) Subscribe() chan interface{}

func (*Broadcaster) SubscribeChannel added in v0.2.0

func (b *Broadcaster) SubscribeChannel(messageCh chan interface{})

func (*Broadcaster) Unsubscribe added in v0.2.0

func (b *Broadcaster) Unsubscribe(messageCh chan interface{})

Jump to

Keyboard shortcuts

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