1.4.5.2
This commit is contained in:
22
EdgeDNS/internal/nodes/server_config.go
Normal file
22
EdgeDNS/internal/nodes/server_config.go
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
|
||||
package nodes
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/sslconfigs"
|
||||
"github.com/iwind/TeaGo/types"
|
||||
)
|
||||
|
||||
// ServerConfig 服务配置
|
||||
type ServerConfig struct {
|
||||
Protocol serverconfigs.Protocol
|
||||
Host string
|
||||
Port int
|
||||
SSLPolicy *sslconfigs.SSLPolicy
|
||||
}
|
||||
|
||||
// FullAddr 服务地址
|
||||
func (this *ServerConfig) FullAddr() string {
|
||||
return this.Protocol.String() + "://" + this.Host + ":" + types.String(this.Port)
|
||||
}
|
||||
Reference in New Issue
Block a user