-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Proxy] chore: Use depinject for relayerProxy (#173)
* chore: Use depinject for relayerProxy * chore: rename option validation function * chore: Add godoc comments * chore: Improve errors readability
- Loading branch information
Showing
7 changed files
with
83 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package proxy | ||
|
||
import ( | ||
"github.com/pokt-network/poktroll/pkg/relayer" | ||
) | ||
|
||
// WithSigningKeyName sets the signing key name used by the relayer proxy to sign relay responses. | ||
// It is used along with the keyring to get the supplier address and sign the relay responses. | ||
func WithSigningKeyName(keyName string) relayer.RelayerProxyOption { | ||
return func(relProxy relayer.RelayerProxy) { | ||
relProxy.(*relayerProxy).signingKeyName = keyName | ||
} | ||
} | ||
|
||
// WithProxiedServicesEndpoints sets the endpoints of the proxied services. | ||
func WithProxiedServicesEndpoints(proxiedServicesEndpoints servicesEndpointsMap) relayer.RelayerProxyOption { | ||
return func(relProxy relayer.RelayerProxy) { | ||
relProxy.(*relayerProxy).proxiedServicesEndpoints = proxiedServicesEndpoints | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters