producer

package
v0.0.0-...-3e69459 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	User      User
	Text      string
	Timestamp time.Time
}

type Module

type Module interface {
	Init(p *Producer)
	Exec(n *Notification)
}

type Notification

type Notification struct {
	Message Message
	Channel string
}

type Producer

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

func NewProducer

func NewProducer(options *ProducerOptions) *Producer

func (*Producer) RegisterModule

func (p *Producer) RegisterModule(path string)

func (*Producer) Say

func (p *Producer) Say(message string)

func (*Producer) Start

func (p *Producer) Start() error

type ProducerOptions

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

func LoadEnv

func LoadEnv() *ProducerOptions

type User

type User struct {
	DisplayName string
	Name        string
}

Jump to

Keyboard shortcuts

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