[#1170] config: Delete notification endpoints

Also, change `http` to `ws` in examples.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-02-10 19:47:26 +03:00 committed by Alex Vanin
parent 3e45b4a085
commit fdf1338d65
7 changed files with 2 additions and 56 deletions

View file

@ -37,19 +37,6 @@ func RPCEndpoint(c *config.Config) []string {
return v
}
// NotificationEndpoint returns list of values of "notification_endpoint" config
// parameter from "morph" section.
//
// Throws panic if list is empty.
func NotificationEndpoint(c *config.Config) []string {
v := config.StringSliceSafe(c.Sub(subsection), "notification_endpoint")
if len(v) == 0 {
panic(fmt.Errorf("no morph chain notification endpoints, see `morph.notification_endpoint` section"))
}
return v
}
// DialTimeout returns value of "dial_timeout" config parameter
// from "morph" section.
//
@ -68,14 +55,3 @@ func DialTimeout(c *config.Config) time.Duration {
func DisableCache(c *config.Config) bool {
return config.BoolSafe(c.Sub(subsection), "disable_cache")
}
// MaxConnPerHost return value of "max_connections_per_host" config
// parameter from "morph" section.
func MaxConnPerHost(c *config.Config) int {
v := config.Uint32Safe(c.Sub(subsection), "max_connections_per_host")
if v > 0 {
return int(v)
}
return MaxConnPerHostDefault
}