Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Raft #8

Merged
merged 1 commit into from
Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions cmd/cete/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,30 +98,6 @@ func main() {
Name: "log-compress",
Usage: "Compress a log file",
},
cli.StringFlag{
Name: "http-access-log-file",
Value: os.Stderr.Name(),
Usage: "HTTP access log file",
},
cli.IntFlag{
Name: "http-access-log-max-size",
Value: 500,
Usage: "Max size of a HTTP access log file (megabytes)",
},
cli.IntFlag{
Name: "http-access-log-max-backups",
Value: 3,
Usage: "Max backup count of HTTP access log files",
},
cli.IntFlag{
Name: "http-access-log-max-age",
Value: 30,
Usage: "Max age of a HTTP access log file (days)",
},
cli.BoolFlag{
Name: "http-access-log-compress",
Usage: "Compress a HTTP access log",
},
},
Action: execStart,
},
Expand Down
14 changes: 1 addition & 13 deletions cmd/cete/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
package main

import (
"github.com/mosuka/cete/http"
"log"
"os"
"os/signal"
"syscall"
Expand All @@ -36,24 +34,14 @@ func execStart(c *cli.Context) error {

logger := cetelog.NewLogger(
c.String("log-level"),
"",
log.LstdFlags|log.Lmicroseconds|log.LUTC,
c.String("log-file"),
c.Int("log-max-size"),
c.Int("log-max-backups"),
c.Int("log-max-age"),
c.Bool("log-compress"),
)

httpAccessLogger := http.NewLogger(
c.String("http-access-log-file"),
c.Int("http-access-log-max-size"),
c.Int("http-access-log-max-backups"),
c.Int("http-access-log-max-age"),
c.Bool("http-access-log-compress"),
)

svr, err := kvs.NewServer(nodeId, bindAddr, grpcAddr, httpAddr, dataDir, joinAddr, logger, httpAccessLogger)
svr, err := kvs.NewServer(nodeId, bindAddr, grpcAddr, httpAddr, dataDir, joinAddr, logger)
if err != nil {
return err
}
Expand Down
16 changes: 5 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,19 @@ go 1.12

require (
github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9 // indirect
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect
github.com/boltdb/bolt v1.3.1 // indirect
github.com/dgraph-io/badger v1.5.4
github.com/dgryski/go-farm v0.0.0-20190323231341-8198c7b169ec // indirect
github.com/golang/protobuf v1.3.1
github.com/golang/protobuf v1.3.2
github.com/gorilla/mux v1.7.0
github.com/hashicorp/go-immutable-radix v1.0.0 // indirect
github.com/hashicorp/go-msgpack v0.5.3 // indirect
github.com/hashicorp/logutils v1.0.0
github.com/hashicorp/raft v1.0.0
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/hashicorp/raft v1.1.2
github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea
github.com/mash/go-accesslog v0.0.0-20180522074327-610c2be04217
github.com/natefinch/lumberjack v2.0.0+incompatible
github.com/paralin/raft-grpc v0.0.0-20171204035242-335ae2b87b1a
github.com/pascaldekloe/goe v0.1.0 // indirect
github.com/pkg/errors v0.8.1 // indirect
github.com/prometheus/client_golang v0.9.2
github.com/stretchr/testify v1.3.0 // indirect
github.com/urfave/cli v1.20.0
go.uber.org/zap v1.14.0
google.golang.org/grpc v1.19.1
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
Expand Down
104 changes: 92 additions & 12 deletions go.sum

Large diffs are not rendered by default.

67 changes: 0 additions & 67 deletions http/log.go

This file was deleted.

113 changes: 0 additions & 113 deletions http/metric.go

This file was deleted.

43 changes: 0 additions & 43 deletions http/response.go

This file was deleted.

4 changes: 2 additions & 2 deletions kvs/grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func NewGRPCClient(address string) (*GRPCClient, error) {
dialOpts := []grpc.DialOption{
grpc.WithInsecure(),
grpc.WithDefaultCallOptions(
grpc.MaxCallSendMsgSize(math.MaxInt32),
grpc.MaxCallRecvMsgSize(math.MaxInt32),
grpc.MaxCallSendMsgSize(math.MaxInt64),
grpc.MaxCallRecvMsgSize(math.MaxInt64),
),
}

Expand Down
Loading