1
0
Fork 0

Use new name

This commit is contained in:
Gregory Eremin 2015-10-14 03:50:43 +03:00
parent 463609a403
commit 583ac5da5b
4 changed files with 13 additions and 13 deletions

View File

@ -5,7 +5,7 @@ into the functions' first argument. Its main purpose is to hide common
unmarshalling code from each function implementation thus reducing
boilerplate and making package interaction code sexier.
[Documentation](https://godoc.org/github.com/localhots/uberdaemon/caller)
[Documentation](https://godoc.org/github.com/localhots/satan/caller)
### Example
@ -14,7 +14,7 @@ package main
import (
"log"
"github.com/localhots/uberdaemon/caller"
"github.com/localhots/satan/caller"
"github.com/path/to/package/messenger"
)
@ -37,7 +37,7 @@ Support code:
package messenger
import (
"github.com/localhots/uberdaemon/caller"
"github.com/localhots/satan/caller"
)
type item struct {

View File

@ -1,4 +1,4 @@
package uberdaemon
package satan
import (
"fmt"

View File

@ -5,12 +5,12 @@ import (
"math/rand"
"time"
"github.com/localhots/uberdaemon"
"github.com/localhots/satan"
)
// NumberPrinter is a daemon that prints numbers once in a while.
type NumberPrinter struct {
uberdaemon.BaseDaemon
satan.BaseDaemon
}
// Startup sets up panic handler and starts enqueuing number printing jobs.
@ -42,7 +42,7 @@ func (n *NumberPrinter) enqueue() {
}
}
func (n *NumberPrinter) makeActor(num int) uberdaemon.Actor {
func (n *NumberPrinter) makeActor(num int) satan.Actor {
return func() {
if rand.Intn(20) == 0 {
panic("Noooooooooo!")

View File

@ -7,8 +7,8 @@ import (
"os"
"os/signal"
"github.com/localhots/uberdaemon"
"github.com/localhots/uberdaemon/example/daemons"
"github.com/localhots/satan"
"github.com/localhots/satan/example/daemons"
)
func main() {
@ -19,10 +19,10 @@ func main() {
log.SetOutput(ioutil.Discard)
}
uberd := uberdaemon.New()
uberd.AddDaemon(&daemons.NumberPrinter{})
uberd.Start()
defer uberd.Stop()
s := satan.Summon()
s.AddDaemon(&daemons.NumberPrinter{})
s.Start()
defer s.Stop()
sig := make(chan os.Signal)
signal.Notify(sig, os.Interrupt)