added auther option for node http settings
This commit is contained in:
parent
5a427b4eaf
commit
04314fa084
@ -12,6 +12,7 @@ import (
|
|||||||
type HTTPNodeSettings struct {
|
type HTTPNodeSettings struct {
|
||||||
Host string
|
Host string
|
||||||
Header map[string]string
|
Header map[string]string
|
||||||
|
Auther auth.Authenticator
|
||||||
}
|
}
|
||||||
|
|
||||||
type TLSNodeSettings struct {
|
type TLSNodeSettings struct {
|
||||||
@ -36,6 +37,7 @@ type NodeOptions struct {
|
|||||||
Path string
|
Path string
|
||||||
HTTP *HTTPNodeSettings
|
HTTP *HTTPNodeSettings
|
||||||
TLS *TLSNodeSettings
|
TLS *TLSNodeSettings
|
||||||
|
// DEPRECATED by HTTP.Auther
|
||||||
Auther auth.Authenticator
|
Auther auth.Authenticator
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,12 +109,6 @@ func TLSNodeOption(tlsSettings *TLSNodeSettings) NodeOption {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func AutherNodeOption(auther auth.Authenticator) NodeOption {
|
|
||||||
return func(o *NodeOptions) {
|
|
||||||
o.Auther = auther
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type Node struct {
|
type Node struct {
|
||||||
Name string
|
Name string
|
||||||
Addr string
|
Addr string
|
||||||
|
Loading…
Reference in New Issue
Block a user