Marina Biryukova
42a0fc8c13
New version of tree/pool selects tree service connection to make request based on the current net map and container placement policy Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
18 lines
560 B
Go
18 lines
560 B
Go
// NOTE: code is taken from https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/df05057ed46632e7746fcaa26731987a9070b2e5/pkg/network/tls.go
|
|
|
|
package network
|
|
|
|
import "github.com/multiformats/go-multiaddr"
|
|
|
|
const (
|
|
tlsProtocolName = "tls"
|
|
)
|
|
|
|
// tls var is used for (un)wrapping other multiaddrs around TLS multiaddr.
|
|
var tls, _ = multiaddr.NewMultiaddr("/" + tlsProtocolName)
|
|
|
|
// IsTLSEnabled searches for wrapped TLS protocol in multiaddr.
|
|
func (a Address) IsTLSEnabled() bool {
|
|
_, err := a.ma.ValueForProtocol(multiaddr.P_TLS)
|
|
return err == nil
|
|
}
|