Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
JellyTony committed Mar 13, 2024
1 parent 92cb6c0 commit 290636e
Showing 3 changed files with 40 additions and 31 deletions.
53 changes: 32 additions & 21 deletions api/config/v1/config.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions api/config/v1/config.proto
Original file line number Diff line number Diff line change
@@ -103,10 +103,10 @@ message Registry {

// Telemetry config
message Telemetry {
bool disable = 1; // disable tracing
bool disable = 1; // disable tracing
string exporter = 2; // tracing exporter, eg: otlphttp, otlpgrpc, stdout, zipkin, file, noop
string endpoint = 3; // tracing endpoint
double sampler = 4; // tracing sampler: 0-1, 1 means full sampling, 0 means no sampling
string endpoint = 3; // tracing endpoint
double sampler = 4; // tracing sampler: 0-1, 1 means full sampling, 0 means no sampling
map<string, string> headers = 5; // otlp headers
string http_path = 6; // otlp http path
}
@@ -125,10 +125,12 @@ message Nacos {
string username = 5;
// nacos config password
string password = 6;
// the nacos server contextpath,default=/nacos,this is not required in 2.0
string context_path = 7;
// nacos config log dir
string log_dir = 7;
string log_dir = 8;
// nacos config cache dir
string cache_dir = 8;
string cache_dir = 9;
// nacos timeout(ms). default 5000
google.protobuf.Duration timeout = 10;
// nacos logger level. default info
6 changes: 1 addition & 5 deletions config/config.go
Original file line number Diff line number Diff line change
@@ -97,11 +97,7 @@ func (c *Config) buildNacosSource() ([]kConfig.Source, error) {
if err != nil {
return nil, err
}

serverConfigs = append(serverConfigs, constant.ServerConfig{
IpAddr: host,
Port: p,
})
serverConfigs = append(serverConfigs, *constant.NewServerConfig(host, p, constant.WithContextPath(cfg.ContextPath)))
}

var duration uint64 = 5000

0 comments on commit 290636e

Please sign in to comment.