json config parser

This commit is contained in:
Darien Raymond committed 2016-10-17 14:35:13 +02:00
1 parent e866ff24a4
commit 5a311cbe08
85 files changed
+9357 -9052

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
package conf
import (
"v2ray.com/core/common/loader"
"v2ray.com/core/proxy/http"
)
type HttpServerConfig struct {
Timeout uint32 `json:"timeout"`
}
func (this *HttpServerConfig) Build() (*loader.TypedSettings, error) {
config := &http.ServerConfig{
Timeout: this.Timeout,
}
return loader.NewTypedSettings(config), nil
}