eventsd

package
v0.0.0-...-b52e348 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

View Source
const (
	TOPIC = "events"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Addons

type Addons struct {
}

type BillMgr

type BillMgr struct {
	Enabled        bool     `toml:"enabled"`
	WHMCSAccessKey string   `toml:"whmcs_key"`
	WHMCSUserName  string   `toml:"whmcs_username"`
	WHMCSPassword  string   `toml:"whmcs_password"`
	WHMCSDomain    string   `toml:"whmcs_domain"`
	PiggyBanks     []string `toml:"piggybanks"`
}

func (BillMgr) String

func (l BillMgr) String() string

type Config

type Config struct {
	Enabled bool    `toml:"enabled"`
	Mailer  Mailer  `toml:"smtp"`
	Slack   Slack   `toml:"slack"`
	Infobip Infobip `toml:"infobip"`
	BillMgr BillMgr `toml:"bill"`
	Addons  Addons  `toml:"addons"`
}

func NewConfig

func NewConfig() *Config

func (Config) String

func (c Config) String() string

type Handler

type Handler struct {
	Deployd *deployd.Config

	EventChannel chan bool
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(c *Config) *Handler

type Infobip

type Infobip struct {
	Enabled       bool   `toml:"enabled"`
	Username      string `toml:"username"`
	Password      string `toml:"password"`
	ApiKey        string `toml:"api_key"`
	ApplicationId string `toml:"application_id"`
	MessageId     string `toml:"message_id"`
}

func (Infobip) String

func (i Infobip) String() string

type Mailer

type Mailer struct {
	Enabled  bool   `toml:"enabled"`
	Domain   string `toml:"domain"`
	Username string `toml:"username"`
	Password string `toml:"password"`
	Identity string `toml:"identity"`
	Sender   string `toml:"sender"`
	Nilavu   string `toml:"nilavu"`
}

func NewMailer

func NewMailer() Mailer

func (Mailer) String

func (m Mailer) String() string

type Service

type Service struct {
	Handler  *Handler
	Consumer *nsq.Consumer
	Meta     *meta.Config
	Eventsd  *Config
	// contains filtered or unexported fields
}

Service manages the listener and handler for an HTTP endpoint.

func NewService

func NewService(c *meta.Config, e *Config, d *deployd.Config) *Service

NewService returns a new instance of Service.

func (*Service) Close

func (s *Service) Close() error

Close closes the underlying subscribe channel.

func (*Service) Err

func (s *Service) Err() <-chan error

Err returns a channel for fatal errors that occur on the listener.

func (*Service) Open

func (s *Service) Open() error

Open starts the service

type Slack

type Slack struct {
	Enabled bool   `toml:"enabled"`
	Token   string `toml:"token"`
	Channel string `toml:"channel"`
}

func (Slack) String

func (s Slack) String() string

Jump to

Keyboard shortcuts

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