阶段性提交

This commit is contained in:
GoEdgeLab
2020-12-23 10:30:42 +08:00
parent 589cde7511
commit 21159b97db
18 changed files with 2115 additions and 770 deletions

View File

@@ -2,6 +2,17 @@ package serverconfigs
import "encoding/json"
func NewHTTPProtocolConfigFromJSON(configJSON []byte) (*HTTPProtocolConfig, error) {
config := &HTTPProtocolConfig{}
if len(configJSON) > 0 {
err := json.Unmarshal(configJSON, config)
if err != nil {
return nil, err
}
}
return config, nil
}
type HTTPProtocolConfig struct {
BaseProtocol `yaml:",inline"`
}