Documentation ¶
Overview ¶
Package config provides a method by which dependencies can be injected into dependency chains, via the use of SupplierFn functions. These functions return functions that can be used in CLI code to chain the dependencies required to start a service into a single depinject.Config.
Index ¶
- func SupplyConfig(ctx context.Context, cmd *cobra.Command, suppliers []SupplierFn) (deps depinject.Config, err error)
- type SupplierFn
- func NewSupplyAccountQuerierFn() SupplierFn
- func NewSupplyApplicationQuerierFn() SupplierFn
- func NewSupplyBlockClientFn(queryNodeRPCURL *url.URL) SupplierFn
- func NewSupplyBlockQueryClientFn(queryNodeRPCUrl *url.URL) SupplierFn
- func NewSupplyDelegationClientFn() SupplierFn
- func NewSupplyEventsQueryClientFn(queryNodeRPCURL *url.URL) SupplierFn
- func NewSupplyLoggerFromCtx(ctx context.Context) SupplierFn
- func NewSupplyPOKTRollSDKFn(signingKeyName string) SupplierFn
- func NewSupplyQueryClientContextFn(queryNodeGRPCURL *url.URL) SupplierFn
- func NewSupplyRingCacheFn() SupplierFn
- func NewSupplySessionQuerierFn() SupplierFn
- func NewSupplySupplierQuerierFn() SupplierFn
- func NewSupplyTxClientContextFn(queryNodeGRPCURL *url.URL, txNodeRPCURL *url.URL) SupplierFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SupplyConfig ¶
func SupplyConfig( ctx context.Context, cmd *cobra.Command, suppliers []SupplierFn, ) (deps depinject.Config, err error)
SupplyConfig supplies a depinject config by calling each of the supplied supplier functions in order and passing the result of each supplier to the next supplier, chaining them together.
Types ¶
type SupplierFn ¶
type SupplierFn func( context.Context, depinject.Config, *cobra.Command, ) (depinject.Config, error)
SupplierFn is a function that is used to supply a depinject config.
func NewSupplyAccountQuerierFn ¶
func NewSupplyAccountQuerierFn() SupplierFn
NewSupplyAccountQuerierFn supplies a depinject config with an AccountQuerier.
func NewSupplyApplicationQuerierFn ¶
func NewSupplyApplicationQuerierFn() SupplierFn
NewSupplyApplicationQuerierFn supplies a depinject config with an ApplicationQuerier.
func NewSupplyBlockClientFn ¶
func NewSupplyBlockClientFn(queryNodeRPCURL *url.URL) SupplierFn
NewSupplyBlockClientFn supplies a depinject config with a blockClient.
func NewSupplyBlockQueryClientFn ¶ added in v0.0.2
func NewSupplyBlockQueryClientFn(queryNodeRPCUrl *url.URL) SupplierFn
newSupplyBlockQueryClientFn returns a function which constructs a BlockQueryClient instance and returns a new depinject.Config which is supplied with the given deps and the new BlockQueryClient.
func NewSupplyDelegationClientFn ¶
func NewSupplyDelegationClientFn() SupplierFn
NewSupplyDelegationClientFn returns a function which constructs a DelegationClient instance and returns a new depinject.Config which is supplied with the given deps and the new DelegationClient.
func NewSupplyEventsQueryClientFn ¶
func NewSupplyEventsQueryClientFn(queryNodeRPCURL *url.URL) SupplierFn
NewSupplyEventsQueryClientFn supplies a depinject config with an EventsQueryClient from the given queryNodeRPCURL.
func NewSupplyLoggerFromCtx ¶
func NewSupplyLoggerFromCtx(ctx context.Context) SupplierFn
NewSupplyLoggerFromCtx supplies a depinject config with a polylog.Logger instance populated from the given context.
func NewSupplyPOKTRollSDKFn ¶
func NewSupplyPOKTRollSDKFn(signingKeyName string) SupplierFn
NewSupplyPOKTRollSDKFn supplies a depinject config with a POKTRollSDK given the signing key name.
func NewSupplyQueryClientContextFn ¶
func NewSupplyQueryClientContextFn(queryNodeGRPCURL *url.URL) SupplierFn
NewSupplyQueryClientContextFn supplies a depinject config with a query
ClientContext, a GRPC client connection, and a keyring from the given queryNodeGRPCURL.
func NewSupplyRingCacheFn ¶
func NewSupplyRingCacheFn() SupplierFn
NewSupplyRingCacheFn supplies a depinject config with a RingCache.
func NewSupplySessionQuerierFn ¶
func NewSupplySessionQuerierFn() SupplierFn
NewSupplySessionQuerierFn supplies a depinject config with a SessionQuerier.
func NewSupplySupplierQuerierFn ¶
func NewSupplySupplierQuerierFn() SupplierFn
NewSupplySupplierQuerierFn supplies a depinject config with a SupplierQuerier.
func NewSupplyTxClientContextFn ¶
func NewSupplyTxClientContextFn( queryNodeGRPCURL *url.URL, txNodeRPCURL *url.URL, ) SupplierFn
NewSupplyTxClientContextFn supplies a depinject config with a TxClientContext from the given txNodeGRPCURL. TODO_TECHDEBT(#256): Remove this function once the as we may no longer need to supply a TxClientContext to the RelayMiner.