Skip to content

Commit

Permalink
Merge pull request #2 from KyberNetwork/refactor-for-public
Browse files Browse the repository at this point in the history
refactor for public
  • Loading branch information
secmask authored Sep 15, 2020
2 parents 2207a3d + 7db0e09 commit 705dec2
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion cmd/ccli/ccli.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/urfave/cli"

"cclog/lib/cclog/client"
"github.com/KyberNetwork/cclog/lib/client"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions cmd/cclog-server/cclog.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/urfave/cli"
"go.uber.org/zap"

"cclog/lib/app"
"cclog/lib/cclog"
"github.com/KyberNetwork/cclog/lib/app"
"github.com/KyberNetwork/cclog/lib/server"
)

const (
Expand Down Expand Up @@ -65,8 +65,8 @@ func run(c *cli.Context) error {
if maxSize <= 0 {
sugar.Fatalw("max size should > 0")
}
wm := cclog.NewWriterMan(c.String(flagBaseDir), maxSize*1024*1024)
server := cclog.NewServer(c.String(flagBindAddr), wm)
wm := server.NewWriterMan(c.String(flagBaseDir), maxSize*1024*1024)
server := server.NewServer(c.String(flagBindAddr), wm)
sugar.Infow("server now start", "bind_addr", c.String(flagBindAddr))
return server.Start()
}
2 changes: 1 addition & 1 deletion cmd/example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"cclog/lib/cclog/client"
"github.com/KyberNetwork/cclog/lib/client"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module cclog
module github.com/KyberNetwork/cclog

go 1.15

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net"
"time"

"cclog/lib/common"
"github.com/KyberNetwork/cclog/lib/common"
)

type SendFailedFn = func(error)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"time"

"cclog/lib/common"
"github.com/KyberNetwork/cclog/lib/common"
)

type SyncLogClient struct {
Expand Down
4 changes: 2 additions & 2 deletions lib/cclog/client_handler.go → lib/server/client_handler.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package cclog
package server

import (
"net"
"regexp"

"go.uber.org/zap"

"cclog/lib/common"
"github.com/KyberNetwork/cclog/lib/common"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion lib/cclog/client_test.go → lib/server/client_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cclog
package server

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion lib/cclog/server.go → lib/server/server.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cclog
package server

import (
"net"
Expand Down
2 changes: 1 addition & 1 deletion lib/cclog/writer.go → lib/server/writer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cclog
package server

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion lib/cclog/writer_test.go → lib/server/writer_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cclog
package server

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion lib/cclog/writterman.go → lib/server/writterman.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cclog
package server

import (
"path/filepath"
Expand Down

0 comments on commit 705dec2

Please sign in to comment.