コード例 #1
0
ファイル: notifier.go プロジェクト: influx6/gu
// 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
}