2015-10-06 21:11:08 +00:00
|
|
|
package config
|
|
|
|
|
|
|
|
type Type string
|
|
|
|
|
|
|
|
const (
|
|
|
|
TypeInbound = Type("inbound")
|
|
|
|
TypeOutbound = Type("outbound")
|
|
|
|
)
|
2015-09-12 20:11:54 +00:00
|
|
|
|
2015-09-19 13:07:10 +00:00
|
|
|
type ConnectionConfig interface {
|
2015-09-19 13:35:20 +00:00
|
|
|
Protocol() string
|
2015-10-06 21:11:08 +00:00
|
|
|
Settings(configType Type) interface{}
|
2015-09-12 20:11:54 +00:00
|
|
|
}
|
|
|
|
|
2015-10-09 15:43:27 +00:00
|
|
|
type LogConfig interface {
|
|
|
|
AccessLog() string
|
|
|
|
}
|
|
|
|
|
2015-09-19 13:07:10 +00:00
|
|
|
type PointConfig interface {
|
2015-09-19 13:35:20 +00:00
|
|
|
Port() uint16
|
2015-10-09 15:43:27 +00:00
|
|
|
LogConfig() LogConfig
|
2015-09-19 13:35:20 +00:00
|
|
|
InboundConfig() ConnectionConfig
|
|
|
|
OutboundConfig() ConnectionConfig
|
2015-09-12 20:11:54 +00:00
|
|
|
}
|