Пример #1
0
// NewNotifier returns a new instance of a page email subscription notifier.
func NewNotifier() *SubmissionNotifier {
	sn := SubmissionNotifier{
		Reactive: gu.NewReactive(),
	}

	sn.start()
	return &sn
}
Пример #2
0
Файл: app.go Проект: influx6/gu
func New(endpoint string, interval time.Duration) *RestfulBox {
	rb := RestfulBox{
		endpoint: endpoint,
		Reactive: gu.NewReactive(),
		ticker:   time.NewTicker(interval),
		closer:   make(chan struct{}),
	}

	return &rb
}