add pkgs from core

This commit is contained in:
ginuerzh
2022-04-04 12:44:35 +08:00
parent 7eb3687e0e
commit a3346ad246
188 changed files with 6084 additions and 283 deletions

View File

@ -15,7 +15,7 @@ import (
"github.com/go-gost/core/connector"
"github.com/go-gost/core/logger"
md "github.com/go-gost/core/metadata"
"github.com/go-gost/core/registry"
"github.com/go-gost/x/registry"
)
func init() {

View File

@ -5,6 +5,7 @@ import (
"time"
mdata "github.com/go-gost/core/metadata"
mdx "github.com/go-gost/x/metadata"
)
type metadata struct {
@ -18,8 +19,8 @@ func (c *http2Connector) parseMetadata(md mdata.Metadata) (err error) {
header = "header"
)
c.md.connectTimeout = mdata.GetDuration(md, connectTimeout)
if mm := mdata.GetStringMapString(md, header); len(mm) > 0 {
c.md.connectTimeout = mdx.GetDuration(md, connectTimeout)
if mm := mdx.GetStringMapString(md, header); len(mm) > 0 {
hd := http.Header{}
for k, v := range mm {
hd.Add(k, v)