application

package
v0.0.0-...-6618439 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGrep

func NewGrep() common.Application

создает новое приложение

func NewPost

func NewPost() common.Application

создает новое приложение

func NewPublish

func NewPublish() common.Application

создает новое приложение

func NewReport

func NewReport() common.Application

создает новое приложение

Types

type Abstract

type Abstract struct {
	CommonTimeout common.Timeout `yaml:"timeouts"`
	// contains filtered or unexported fields
}

базовое приложение

func (*Abstract) Done

func (a *Abstract) Done() chan bool

возвращает канал завершения приложения

func (*Abstract) Events

func (a *Abstract) Events() chan *common.ApplicationEvent

возвращает канал событий приложения

func (*Abstract) FireFinish

func (a *Abstract) FireFinish(event *common.ApplicationEvent, abstractService interface{})

останавливает сервисы приложения

func (*Abstract) FireInit

func (a *Abstract) FireInit(event *common.ApplicationEvent, abstractService interface{})

инициализирует сервисы

func (*Abstract) FireRun

func (a *Abstract) FireRun(event *common.ApplicationEvent, abstractService interface{})

запускает сервисы приложения

func (Abstract) GetConfigFilename

func (a Abstract) GetConfigFilename() string

func (*Abstract) Init

func (a *Abstract) Init(event *common.ApplicationEvent)

инициализирует приложение

func (*Abstract) IsValidConfigFilename

func (a *Abstract) IsValidConfigFilename(filename string) bool

проверяет валидность пути к файлу с настройками

func (*Abstract) Run

func (a *Abstract) Run()

запускает приложение

func (*Abstract) RunWithArgs

func (a *Abstract) RunWithArgs(args ...interface{})

запускает приложение с аргументами

func (*Abstract) Services

func (a *Abstract) Services() []interface{}

возвращает сервисы, используемые приложением

func (*Abstract) SetConfigFilename

func (a *Abstract) SetConfigFilename(configFilename string)

устанавливает путь к файлу с настройками

func (*Abstract) SetDone

func (a *Abstract) SetDone(done chan bool)

устанавливает канал завершения приложения

func (*Abstract) SetEvents

func (a *Abstract) SetEvents(events chan *common.ApplicationEvent)

устанавливает канал событий приложения

func (*Abstract) Timeout

func (a *Abstract) Timeout() common.Timeout

возвращает таймауты приложения

type FinishFireAction

type FinishFireAction func(*Abstract, *common.ApplicationEvent, interface{})

func (FinishFireAction) Fire

func (f FinishFireAction) Fire(app common.Application, event *common.ApplicationEvent, abstractService interface{})

func (FinishFireAction) PostFire

func (f FinishFireAction) PostFire(app common.Application, event *common.ApplicationEvent)

type FireAction

type FireAction interface {
	Fire(common.Application, *common.ApplicationEvent, interface{})
}

type Grep

type Grep struct {
	Abstract
}

приложение, ищущее логи по адресату или получателю

func (*Grep) FireRun

func (g *Grep) FireRun(event *common.ApplicationEvent, abstractService interface{})

запускает сервисы приложения

func (*Grep) RunWithArgs

func (g *Grep) RunWithArgs(args ...interface{})

запускает приложение с аргументами

type InitFireAction

type InitFireAction func(*Abstract, *common.ApplicationEvent, interface{})

func (InitFireAction) Fire

func (i InitFireAction) Fire(app common.Application, event *common.ApplicationEvent, abstractService interface{})

func (InitFireAction) PostFire

func (i InitFireAction) PostFire(app common.Application, event *common.ApplicationEvent)

func (InitFireAction) PreFire

func (i InitFireAction) PreFire(app common.Application, event *common.ApplicationEvent)

type Post

type Post struct {
	Abstract

	// количество отправителей
	Workers int `yaml:"workers"`
}

приложение, рассылающее письма

func (*Post) FireFinish

func (p *Post) FireFinish(event *common.ApplicationEvent, abstractService interface{})

останавливает сервисы приложения

func (*Post) FireRun

func (p *Post) FireRun(event *common.ApplicationEvent, abstractService interface{})

запускает сервисы приложения

func (*Post) Init

func (p *Post) Init(event *common.ApplicationEvent)

инициализирует приложение

func (*Post) Run

func (p *Post) Run()

запускает приложение

type PostFireAction

type PostFireAction interface {
	FireAction
	PostFire(common.Application, *common.ApplicationEvent)
}

type PreFireAction

type PreFireAction interface {
	FireAction
	PreFire(common.Application, *common.ApplicationEvent)
}

type Publish

type Publish struct {
	Abstract
}

приложение, перекладывающее письма из очереди в очередь

func (*Publish) FireRun

func (p *Publish) FireRun(event *common.ApplicationEvent, abstractService interface{})

запускает сервисы приложения

func (*Publish) RunWithArgs

func (p *Publish) RunWithArgs(args ...interface{})

запускает приложение с аргументами

type Report

type Report struct {
	Abstract
}

приложение, анализирующее неотправленные сообщения

func (*Report) FireRun

func (r *Report) FireRun(event *common.ApplicationEvent, abstractService interface{})

запускает сервисы приложения

func (*Report) Run

func (r *Report) Run()

запускает приложение

type RunFireAction

type RunFireAction func(*Abstract, *common.ApplicationEvent, interface{})

func (RunFireAction) Fire

func (r RunFireAction) Fire(app common.Application, event *common.ApplicationEvent, abstractService interface{})

Jump to

Keyboard shortcuts

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