WIP adopt updated yaml-config with 'fromdefaults' struct tag

This commit is contained in:
Christian Schwarz
2018-08-31 21:50:59 +02:00
parent b95e983d0d
commit d55a271ac7
16 changed files with 206 additions and 26 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ type ListenerFactory interface {
Listen() (net.Listener, error)
}
func FromConfig(g config.Global, in config.ServeEnum) (ListenerFactory, error) {
func FromConfig(g *config.Global, in config.ServeEnum) (ListenerFactory, error) {
switch v := in.Ret.(type) {
case *config.TCPServe:
+1 -1
View File
@@ -15,7 +15,7 @@ type StdinserverListenerFactory struct {
sockpath string
}
func StdinserverListenerFactoryFromConfig(g config.Global, in *config.StdinserverServer) (f *StdinserverListenerFactory, err error) {
func StdinserverListenerFactoryFromConfig(g *config.Global, in *config.StdinserverServer) (f *StdinserverListenerFactory, err error) {
f = &StdinserverListenerFactory{
ClientIdentity: in.ClientIdentity,
+1 -1
View File
@@ -9,7 +9,7 @@ type TCPListenerFactory struct {
Address string
}
func TCPListenerFactoryFromConfig(c config.Global, in *config.TCPServe) (*TCPListenerFactory, error) {
func TCPListenerFactoryFromConfig(c *config.Global, in *config.TCPServe) (*TCPListenerFactory, error) {
lf := &TCPListenerFactory{
Address: in.Listen,
}
+1 -1
View File
@@ -18,7 +18,7 @@ type TLSListenerFactory struct {
handshakeTimeout time.Duration
}
func TLSListenerFactoryFromConfig(c config.Global, in *config.TLSServe) (lf *TLSListenerFactory, err error) {
func TLSListenerFactoryFromConfig(c *config.Global, in *config.TLSServe) (lf *TLSListenerFactory, err error) {
lf = &TLSListenerFactory{
address: in.Listen,
}