mirror of
https://github.com/number571/go-peer.git
synced 2026-09-12 19:50:00 +05:00
update
This commit is contained in:
parent
f645e4d0c3
commit
91d49d0ee3
@ -521,7 +521,6 @@ logging:
|
||||
- erro
|
||||
address:
|
||||
incoming: 127.0.0.1:9532
|
||||
connection: 127.0.0.1:9572
|
||||
```
|
||||
|
||||
### Example
|
||||
|
||||
@ -6,4 +6,3 @@ logging:
|
||||
- erro
|
||||
address:
|
||||
incoming: 127.0.0.1:9532
|
||||
connection: 127.0.0.1:9572
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
@ -62,7 +62,6 @@ logging:
|
||||
- erro
|
||||
address:
|
||||
incoming: 127.0.0.1:9532
|
||||
connection: 127.0.0.1:9572
|
||||
```
|
||||
|
||||
## Running options
|
||||
|
||||
@ -20,10 +20,9 @@ type SConfigSettings struct {
|
||||
type SConfig struct {
|
||||
fLogging logger.ILogging
|
||||
|
||||
FSettings *SConfigSettings `yaml:"settings"`
|
||||
FLogging []string `yaml:"logging,omitempty"`
|
||||
FAddress *SAddress `yaml:"address"`
|
||||
FConnection string `yaml:"connection"`
|
||||
FSettings *SConfigSettings `yaml:"settings"`
|
||||
FLogging []string `yaml:"logging,omitempty"`
|
||||
FAddress *SAddress `yaml:"address"`
|
||||
}
|
||||
|
||||
type SAddress struct {
|
||||
@ -116,10 +115,6 @@ func (p *SConfig) GetAddress() IAddress {
|
||||
return p.FAddress
|
||||
}
|
||||
|
||||
func (p *SConfig) GetConnection() string {
|
||||
return p.FConnection
|
||||
}
|
||||
|
||||
func (p *SAddress) GetIncoming() string {
|
||||
return p.FIncoming
|
||||
}
|
||||
|
||||
@ -6,12 +6,11 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
tcExecTimeout = 5000
|
||||
tcConfigFile = "config_test.txt"
|
||||
tcLogging = true
|
||||
tcAddress1 = "test_address1"
|
||||
tcAddress2 = "test_address2"
|
||||
tcConnectionService = "test_connection"
|
||||
tcExecTimeout = 5000
|
||||
tcConfigFile = "config_test.txt"
|
||||
tcLogging = true
|
||||
tcAddress1 = "test_address1"
|
||||
tcAddress2 = "test_address2"
|
||||
)
|
||||
|
||||
func TestError(t *testing.T) {
|
||||
@ -30,8 +29,7 @@ func testConfigDefaultInit(configPath string) {
|
||||
FSettings: &SConfigSettings{
|
||||
FExecTimeoutMS: tcExecTimeout,
|
||||
},
|
||||
FLogging: []string{"info", "erro"},
|
||||
FConnection: tcConnectionService,
|
||||
FLogging: []string{"info", "erro"},
|
||||
FAddress: &SAddress{
|
||||
FIncoming: tcAddress1,
|
||||
FPPROF: tcAddress2,
|
||||
@ -51,11 +49,6 @@ func TestConfig(t *testing.T) {
|
||||
return
|
||||
}
|
||||
|
||||
if cfg.GetConnection() != tcConnectionService {
|
||||
t.Error("connection.service is invalid")
|
||||
return
|
||||
}
|
||||
|
||||
if cfg.GetLogging().HasInfo() != tcLogging {
|
||||
t.Error("logging.info is invalid")
|
||||
return
|
||||
|
||||
@ -4,7 +4,6 @@ import (
|
||||
"os"
|
||||
|
||||
hlr_settings "github.com/number571/go-peer/cmd/hidden_lake/applications/remoter/pkg/settings"
|
||||
hls_settings "github.com/number571/go-peer/cmd/hidden_lake/service/pkg/settings"
|
||||
logger "github.com/number571/go-peer/internal/logger/std"
|
||||
)
|
||||
|
||||
@ -22,7 +21,6 @@ func InitConfig(cfgPath string, initCfg *SConfig) (IConfig, error) {
|
||||
FIncoming: hlr_settings.CDefaultIncomingAddress,
|
||||
FPPROF: "",
|
||||
},
|
||||
FConnection: hls_settings.CDefaultHTTPAddress,
|
||||
}
|
||||
}
|
||||
return BuildConfig(cfgPath, initCfg)
|
||||
|
||||
@ -6,7 +6,6 @@ import (
|
||||
"testing"
|
||||
|
||||
hlr_settings "github.com/number571/go-peer/cmd/hidden_lake/applications/remoter/pkg/settings"
|
||||
hls_settings "github.com/number571/go-peer/cmd/hidden_lake/service/pkg/settings"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -67,9 +66,4 @@ func TestInit(t *testing.T) {
|
||||
t.Error("got invalid field with exist config (3)")
|
||||
return
|
||||
}
|
||||
|
||||
if config3.GetConnection() != hls_settings.CDefaultHTTPAddress {
|
||||
t.Error("got invalid field with exist config (4)")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,6 @@ type IConfig interface {
|
||||
GetSettings() IConfigSettings
|
||||
GetAddress() IAddress
|
||||
GetLogging() logger.ILogging
|
||||
GetConnection() string
|
||||
}
|
||||
|
||||
type IConfigSettings interface {
|
||||
|
||||
@ -6,4 +6,3 @@ logging:
|
||||
- erro
|
||||
address:
|
||||
incoming: :9532
|
||||
connection: recv_hlc:9572
|
||||
|
||||
@ -6,4 +6,3 @@ logging:
|
||||
- erro
|
||||
address:
|
||||
incoming: :9532
|
||||
connection: recv_hlc:9572
|
||||
|
||||
@ -6,4 +6,3 @@ logging:
|
||||
- erro
|
||||
address:
|
||||
incoming: :9532
|
||||
connection: recv_hlc:9572
|
||||
|
||||
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="20" role="img" aria-label="code lines: 43487"><title>code lines: 43487</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="96" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="57" height="20" fill="#555"/><rect x="57" width="40" height="20" fill="#4682b4"/><rect width="96" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="295" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="510">code lines</text><text x="295" y="140" transform="scale(.1)" fill="#fff" textLength="510">code lines</text><text aria-hidden="true" x="770" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="320">43487</text><text x="770" y="140" transform="scale(.1)" fill="#fff" textLength="320">43487</text></g></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="20" role="img" aria-label="code lines: 43466"><title>code lines: 43466</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="96" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="57" height="20" fill="#555"/><rect x="57" width="40" height="20" fill="#4682b4"/><rect width="96" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="295" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="510">code lines</text><text x="295" y="140" transform="scale(.1)" fill="#fff" textLength="510">code lines</text><text aria-hidden="true" x="770" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="320">43466</text><text x="770" y="140" transform="scale(.1)" fill="#fff" textLength="320">43466</text></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
12694
test/result/coverage.out
12694
test/result/coverage.out
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@
|
||||
>
|
||||
|
||||
<g>
|
||||
<rect x="20.000000" y="20.000000" width="988.000000" height="600.000000" style="fill: rgb(3, 112, 59);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="20.000000" y="20.000000" width="988.000000" height="600.000000" style="fill: rgb(2, 112, 59);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="28.000000" y="41.600000" width="839.473310" height="570.400000" style="fill: rgb(3, 113, 60);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="28.000000" y="41.600000" width="839.473310" height="570.400000" style="fill: rgb(3, 113, 59);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
@ -247,7 +247,7 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="36.000000" y="63.200000" width="462.826039" height="540.800000" style="fill: rgb(3, 112, 59);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="36.000000" y="63.200000" width="462.826039" height="540.800000" style="fill: rgb(2, 111, 59);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
@ -658,7 +658,7 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="44.000000" y="337.608140" width="182.691937" height="258.391860" style="fill: rgb(8, 123, 65);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="44.000000" y="337.608140" width="182.691937" height="258.391860" style="fill: rgb(6, 120, 63);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
|
||||
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Loading…
Reference in New Issue
Block a user