move config and api modules to individual repo
This commit is contained in:
@ -9,9 +9,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-gost/gost/v3/pkg/config"
|
||||
"github.com/go-gost/config"
|
||||
"github.com/go-gost/gost/v3/pkg/metadata"
|
||||
metrics "github.com/go-gost/gost/v3/pkg/metrics/service"
|
||||
"github.com/go-gost/gost/v3/pkg/registry"
|
||||
)
|
||||
|
||||
@ -35,15 +34,14 @@ func buildConfigFromCmd(services, nodes stringList) (*config.Config, error) {
|
||||
|
||||
if v := os.Getenv("GOST_PROFILING"); v != "" {
|
||||
cfg.Profiling = &config.ProfilingConfig{
|
||||
Addr: v,
|
||||
Enable: true,
|
||||
Addr: v,
|
||||
}
|
||||
}
|
||||
if v := os.Getenv("GOST_METRICS"); v != "" {
|
||||
cfg.Metrics = &config.MetricsConfig{
|
||||
Enable: true,
|
||||
Addr: v,
|
||||
Path: metrics.DefaultPath,
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,6 +51,12 @@ func buildConfigFromCmd(services, nodes stringList) (*config.Config, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if v := os.Getenv("GOST_API"); v != "" {
|
||||
cfg.API = &config.APIConfig{
|
||||
Addr: v,
|
||||
}
|
||||
}
|
||||
|
||||
var chain *config.ChainConfig
|
||||
if len(nodes) > 0 {
|
||||
chain = &config.ChainConfig{
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/go-gost/gost/v3/pkg/api"
|
||||
"github.com/go-gost/gost/v3/pkg/config"
|
||||
"github.com/go-gost/gost/v3/pkg/config/parsing"
|
||||
"github.com/go-gost/api"
|
||||
"github.com/go-gost/config"
|
||||
"github.com/go-gost/config/parsing"
|
||||
"github.com/go-gost/gost/v3/pkg/logger"
|
||||
metrics "github.com/go-gost/gost/v3/pkg/metrics/service"
|
||||
"github.com/go-gost/gost/v3/pkg/registry"
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/go-gost/gost/v3/pkg/config"
|
||||
"github.com/go-gost/config"
|
||||
"github.com/go-gost/gost/v3/pkg/logger"
|
||||
"github.com/go-gost/gost/v3/pkg/metrics"
|
||||
)
|
||||
|
@ -10,8 +10,8 @@ import (
|
||||
"math/big"
|
||||
"time"
|
||||
|
||||
"github.com/go-gost/config"
|
||||
tls_util "github.com/go-gost/gost/v3/pkg/common/util/tls"
|
||||
"github.com/go-gost/gost/v3/pkg/config"
|
||||
)
|
||||
|
||||
func buildDefaultTLSConfig(cfg *config.TLSConfig) {
|
||||
|
Reference in New Issue
Block a user