Skip to content

Commit

Permalink
add a message with the port of the controller
Browse files Browse the repository at this point in the history
  • Loading branch information
lafikl committed Apr 26, 2018
1 parent cd60402 commit 78d7251
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/tidwall/redcon"
)

var addr = ":6380"
var configAddr = ":6380"

const (
RULEADD = "ruleadd"
Expand Down Expand Up @@ -76,7 +76,7 @@ func (c *Controller) parseRule(rule *Rule, buf string) error {
}

func (c *Controller) Start() error {
err := redcon.ListenAndServe(addr,
err := redcon.ListenAndServe(configAddr,
func(conn redcon.Conn, cmd redcon.Command) {
switch strings.ToLower(string(cmd.Args[0])) {
default:
Expand Down
4 changes: 2 additions & 2 deletions redfi.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,16 @@ func (p *Proxy) Start() error {
log.Fatal(err)
}

fmt.Println("RedFI is listening on ", p.addr)
fmt.Println("\nRedFI is listening on", p.addr)
fmt.Println("Don't forget to point your client to that address.")
// go p.startAPI()

ctr, err := newController(p.plan)
if err != nil {
log.Fatal(err)
}

go func() {
fmt.Println("\nRedFI Controller is listening on", configAddr)
err := ctr.Start()
if err != nil {
log.Fatal("encountered err while starting controller", err)
Expand Down

0 comments on commit 78d7251

Please sign in to comment.