Skip to content

Commit

Permalink
merge: branch '3615-config-schema' into 'main'
Browse files Browse the repository at this point in the history
Convert cmd/accumulated/run to schema [#3615]

Closes #3615

See merge request accumulatenetwork/accumulate!1083
  • Loading branch information
firelizzard18 committed Jul 11, 2024
2 parents e7299fe + f46fea8 commit 576d3c6
Show file tree
Hide file tree
Showing 24 changed files with 3,373 additions and 5,184 deletions.
3 changes: 2 additions & 1 deletion cmd/accumulated-http/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
. "gitlab.com/accumulatenetwork/accumulate/internal/util/cmd"
cmdutil "gitlab.com/accumulatenetwork/accumulate/internal/util/cmd"
"gitlab.com/accumulatenetwork/accumulate/pkg/accumulate"
"gitlab.com/accumulatenetwork/accumulate/pkg/types/encoding"
)

func main() {
Expand Down Expand Up @@ -116,7 +117,7 @@ func run(cmd *cobra.Command, args []string) {
HttpListener: HttpListener{
Listen: flag.HttpListen,
ConnectionLimit: &flag.ConnLimit,
ReadHeaderTimeout: &flag.Timeout,
ReadHeaderTimeout: (*encoding.Duration)(&flag.Timeout),
TlsCertPath: flag.TlsCert,
TlsKeyPath: flag.TlsKey,
},
Expand Down
4 changes: 2 additions & 2 deletions cmd/accumulated/cmd_init_devnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ func applyDevNetFlags(cmd *cobra.Command, cfg *run.Config, dev *run.DevnetConfig
}

if cmd.Flag("database").Changed {
typ, ok := run.StorageTypeByName(flagRunDevnet.Database)
if !ok {
var typ run.StorageType
if !typ.SetByName(flagRunDevnet.Database) {
fatalf("--database: %q is not a valid storage type", flagRunDevnet.Database)
}
dev.StorageType = &typ
Expand Down
Loading

0 comments on commit 576d3c6

Please sign in to comment.