Skip to content

Commit 4259f84

Browse files
committed
INFOPLAT-2962 Add deprecation warning for NewStaticAuthHeaderProvider
Adjust return type
1 parent 9ef66d9 commit 4259f84

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/beholder/auth.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"fmt"
1010
"time"
1111

12+
"github.com/smartcontractkit/chainlink-common/pkg/chipingress"
1213
"google.golang.org/grpc"
1314
"google.golang.org/grpc/credentials"
1415
)
@@ -58,10 +59,15 @@ func (p *staticAuth) RequireTransportSecurity() bool {
5859
return p.requireTransportSecurity
5960
}
6061

61-
func NewStaticAuth(headers map[string]string, requireTransportSecurity bool) HeaderProvider {
62+
func NewStaticAuth(headers map[string]string, requireTransportSecurity bool) Auth {
6263
return &staticAuth{headers, requireTransportSecurity}
6364
}
6465

66+
// Deprecated: use NewStaticAuth instead
67+
func NewStaticAuthHeaderProvider(headers map[string]string) chipingress.HeaderProvider {
68+
return &staticAuth{headers: headers}
69+
}
70+
6571
type rotatingAuth struct {
6672
csaPubKey ed25519.PublicKey
6773
signer Signer

0 commit comments

Comments
 (0)