Skip to content

Commit

Permalink
add dirs http service need
Browse files Browse the repository at this point in the history
Signed-off-by: wanghai01 <[email protected]>
  • Loading branch information
SeanHai committed Jul 14, 2023
1 parent 60cee71 commit 7d3bd4b
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions cli/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@ import (

type CurveAdm struct {
// project layout
rootDir string
dataDir string
pluginDir string
logDir string
tempDir string
dbpath string
logpath string
config *configure.CurveAdmConfig
rootDir string
dataDir string
pluginDir string
logDir string
tempDir string
dbpath string
logpath string
httpConfPath string
httpLogPath string
config *configure.CurveAdmConfig

// data pipeline
in io.Reader
Expand Down Expand Up @@ -97,6 +99,8 @@ func NewCurveAdm() (*CurveAdm, error) {
pluginDir: path.Join(rootDir, "plugins"),
logDir: path.Join(rootDir, "logs"),
tempDir: path.Join(rootDir, "temp"),
httpConfPath: path.Join(rootDir, "http/conf"),
httpLogPath: path.Join(rootDir, "http/logs"),
}

err = curveadm.init()
Expand All @@ -116,6 +120,8 @@ func (curveadm *CurveAdm) init() error {
curveadm.pluginDir,
curveadm.logDir,
curveadm.tempDir,
curveadm.httpConfPath,
curveadm.httpLogPath,
}
for _, dir := range dirs {
if err := os.MkdirAll(dir, os.ModePerm); err != nil {
Expand Down

0 comments on commit 7d3bd4b

Please sign in to comment.