Archived
对服务增加基础的数据统计/部分代码分Package
This commit is contained in:
@@ -161,19 +161,19 @@ func (this *ServerConfig) AsJSON() ([]byte, error) {
|
||||
return json.Marshal(this)
|
||||
}
|
||||
|
||||
func (this *ServerConfig) IsHTTP() bool {
|
||||
func (this *ServerConfig) IsHTTPFamily() bool {
|
||||
return this.HTTP != nil || this.HTTPS != nil
|
||||
}
|
||||
|
||||
func (this *ServerConfig) IsTCP() bool {
|
||||
func (this *ServerConfig) IsTCPFamily() bool {
|
||||
return this.TCP != nil || this.TLS != nil
|
||||
}
|
||||
|
||||
func (this *ServerConfig) IsUnix() bool {
|
||||
func (this *ServerConfig) IsUnixFamily() bool {
|
||||
return this.Unix != nil
|
||||
}
|
||||
|
||||
func (this *ServerConfig) IsUDP() bool {
|
||||
func (this *ServerConfig) IsUDPFamily() bool {
|
||||
return this.UDP != nil
|
||||
}
|
||||
|
||||
|
||||
@@ -95,3 +95,7 @@ func AllServerProtocolsForType(serverType ServerType) []maps.Map {
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
func IsHTTPServerType(serverType ServerType) bool {
|
||||
return serverType == ServerTypeHTTPProxy || serverType == ServerTypeHTTPWeb
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user