added auther option for node http settings

This commit is contained in:
ginuerzh 2024-01-27 21:06:04 +08:00
parent 5a427b4eaf
commit 04314fa084

View File

@ -12,6 +12,7 @@ import (
type HTTPNodeSettings struct {
Host string
Header map[string]string
Auther auth.Authenticator
}
type TLSNodeSettings struct {
@ -36,7 +37,8 @@ type NodeOptions struct {
Path string
HTTP *HTTPNodeSettings
TLS *TLSNodeSettings
Auther auth.Authenticator
// DEPRECATED by HTTP.Auther
Auther auth.Authenticator
}
type NodeOption func(*NodeOptions)
@ -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 {
Name string
Addr string