Skip to content

Commit

Permalink
remove useless file
Browse files Browse the repository at this point in the history
  • Loading branch information
aajkl committed Jun 29, 2024
1 parent aadcd03 commit 72bf2c3
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 139 deletions.
14 changes: 1 addition & 13 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ secret_key = "abcd"
bucket = "eru-images"
base_dir = "/tmp/.image/"

[network]
[network.ovn]
nb_addrs = ["tcp:127.0.0.1:6641"]

[jwt]
key = "5$!UEmvB#nRB@Iwab#Sy!zofKEOGLRtE"
key = "7$!UEmVB#nKB@Iwab#SH!zofbEOGLRtE"

[redis]
addr = "127.0.0.1:6379"
Expand All @@ -39,11 +35,3 @@ master_name = "mymaster"
username = ""
password = ""
expire = 604800

[flow]
host = "127.0.0.1"
port = 8090
open_trace_url = "127.0.0.1:5775"

[flow.redis]
db = 2
12 changes: 0 additions & 12 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@ var (
type Config struct {
GlobalTimeout time.Duration `toml:"global_timeout" default:"5m"`
MaxConcurrency int `toml:"max_concurrency" default:"10000"`
Pod string `toml:"pod" default:"virt"`
Server ServerConfig `toml:"server"`
RBD RBDConfig `toml:"rbd"`
Log LogConfig `toml:"log"`
Redis RedisConfig `toml:"redis"`
Mysql MysqlConfig `toml:"mysql"`
Storage StorageConfig `toml:"storage"`
JWT JWTConfig `toml:"jwt"`
Flow FlowConfig `toml:"flow"`
}

type ServerConfig struct {
Expand Down Expand Up @@ -77,13 +75,6 @@ type BackoffConfig struct {
MaxInterval time.Duration `toml:"max_interval" default:"60m"`
MaxElapsedTime time.Duration `toml:"max_elapsed_time" default:"2h"`
}
type FlowConfig struct {
Bind string `toml:"bind" default:":8090"`
Redis RedisConfig `toml:"redis"`
RetryCount int `toml:"retry_count" default:"5"`
Backoff BackoffConfig `toml:"backoff"`
}

type MysqlConfig struct {
DSN string `toml:"dsn"`
MaxOpenConns int `toml:"max_open_connections"`
Expand Down Expand Up @@ -146,9 +137,6 @@ func loadConfigFromBytes(cfgBytes []byte) (*Config, error) {
if err != nil {
return nil, err
}
// do some modifications
// copy redis config to flow redis config
cfg.Redis.CopyToIfEmpty(&cfg.Flow.Redis)

err = checkConfig(cfg)
return cfg, err
Expand Down
49 changes: 0 additions & 49 deletions doc/dev.md

This file was deleted.

4 changes: 0 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ require (
github.com/go-redsync/redsync/v4 v4.13.0
github.com/go-sql-driver/mysql v1.7.1
github.com/google/uuid v1.5.0
github.com/hibiken/asynq v0.24.1
github.com/jmoiron/sqlx v1.3.5
github.com/johannesboyne/gofakes3 v0.0.0-20240217095638-c55a48f17be6
github.com/mcuadros/go-defaults v1.2.0
Expand Down Expand Up @@ -98,12 +97,10 @@ require (
github.com/nicksnyder/go-i18n/v2 v2.4.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 // indirect
github.com/shabbyrobe/gocovmerge v0.0.0-20190829150210-3e036491d500 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
Expand All @@ -113,7 +110,6 @@ require (
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.21.0 // indirect
google.golang.org/grpc v1.60.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
Expand Down
Loading

0 comments on commit 72bf2c3

Please sign in to comment.