notify

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name ...
	Name = "notify"
	// TopicNotify ...
	TopicNotify = "notify"
)

Variables

This section is empty.

Functions

func New

func New() plugins.Plugable

New ...

Types

type Message

type Message struct {
	From       common.EntityId  `json:"from"`
	Type       string           `json:"type"`
	Attributes m.AttributeValue `json:"attributes"`
}

Message ...

func NewMessage

func NewMessage() *Message

NewMessage ...

type Notify

type Notify interface {
	Shutdown() error
	Start() (err error)
	Stat() *Stat
	Repeat(msg m.MessageDelivery)
	Send(msg Message)
	AddProvider(name string, provider Provider)
	RemoveProvider(name string)
	Provider(name string) (provider Provider, err error)
}

Notify ...

func NewNotify

func NewNotify(
	adaptor *adaptors.Adaptors,
	scriptService scripts.ScriptService) Notify

NewNotify ...

type NotifyBind

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

NotifyBind ...

func NewNotifyBind

func NewNotifyBind(notify *notify) *NotifyBind

NewNotifyBind ...

func (*NotifyBind) NewMessage

func (b *NotifyBind) NewMessage() *Message

NewMessage ...

func (*NotifyBind) Send

func (b *NotifyBind) Send(msg Message)

Send ...

type Provider

type Provider interface {
	Save(Message) (addresses []string, message m.Message)
	Send(addresses string, message m.Message) error
	MessageParams() m.Attributes
}

Provider ...

type ProviderRegistrar

type ProviderRegistrar interface {
	AddProvider(name string, provider Provider)
	RemoveProvider(name string)
	Provider(name string) (provider Provider, err error)
}

ProviderRegistrar ...

type Stat

type Stat struct {
	Workers int `json:"workers"`
}

Stat ...

type TemplateBind

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

TemplateBind ...

func NewTemplateBind

func NewTemplateBind(adaptor *adaptors.Adaptors) *TemplateBind

NewTemplateBind ...

func (*TemplateBind) Render

func (t *TemplateBind) Render(templateName string, params map[string]interface{}) *m.TemplateRender

Render ...

type Worker

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

Worker ...

func NewWorker

func NewWorker(adaptor *adaptors.Adaptors) *Worker

NewWorker ...

func (*Worker) InWork

func (w *Worker) InWork() bool

InWork ...

Jump to

Keyboard shortcuts

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