From 04314fa084761bec0f9da1319138d10e5d59399f Mon Sep 17 00:00:00 2001 From: ginuerzh Date: Sat, 27 Jan 2024 21:06:04 +0800 Subject: [PATCH] added auther option for node http settings --- chain/node.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/chain/node.go b/chain/node.go index f2d7f20..4f66e94 100644 --- a/chain/node.go +++ b/chain/node.go @@ -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