add more node options
This commit is contained in:
@ -17,6 +17,11 @@ type HTTPNodeSettings struct {
|
||||
type TLSNodeSettings struct {
|
||||
ServerName string
|
||||
Secure bool
|
||||
Options struct {
|
||||
MinVersion string
|
||||
MaxVersion string
|
||||
CipherSuites []string
|
||||
}
|
||||
}
|
||||
|
||||
type NodeOptions struct {
|
||||
@ -28,6 +33,7 @@ type NodeOptions struct {
|
||||
Host string
|
||||
Network string
|
||||
Protocol string
|
||||
Path string
|
||||
HTTP *HTTPNodeSettings
|
||||
TLS *TLSNodeSettings
|
||||
Auther auth.Authenticator
|
||||
@ -77,6 +83,12 @@ func ProtocolNodeOption(protocol string) NodeOption {
|
||||
}
|
||||
}
|
||||
|
||||
func PathNodeOption(path string) NodeOption {
|
||||
return func(o *NodeOptions) {
|
||||
o.Path = path
|
||||
}
|
||||
}
|
||||
|
||||
func MetadataNodeOption(md metadata.Metadata) NodeOption {
|
||||
return func(o *NodeOptions) {
|
||||
o.Metadata = md
|
||||
|
Reference in New Issue
Block a user