Files
EdgeNode/internal/configs/protocol_unix_config.go

15 lines
365 B
Go
Raw Normal View History

2020-07-21 11:18:47 +08:00
package configs
type UnixProtocolConfig struct {
IsOn bool `yaml:"isOn"` // 是否开启
Listen []string `yaml:"listen" json:"listen"` // 监听地址
}
func (this *UnixProtocolConfig) Addresses() []string {
result := []string{}
for _, listen := range this.Listen {
result = append(result, ProtocolUnix+":"+listen)
}
return result
}