WIP adopt updated yaml-config with 'fromdefaults' struct tag
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user