Documentation ¶
Index ¶
- Constants
- func NewFunctionsHandler(cfg FunctionsHandlerConfig, donConfig *config.DONConfig, don handlers.DON, ...) handlers.Handler
- func NewFunctionsHandlerFromConfig(handlerConfig json.RawMessage, donConfig *config.DONConfig, don handlers.DON, ...) (handlers.Handler, error)
- type CombinedSecretsResponse
- type FunctionsHandlerConfig
- type OnchainAllowlist
- type OnchainAllowlistConfig
- type PendingSecretsRequest
- type SecretsListResponse
- type SecretsListRow
- type SecretsResponseBase
- type SecretsSetRequest
- type SecretsSetResponse
Constants ¶
View Source
const ( MethodSecretsSet = "secrets_set" MethodSecretsList = "secrets_list" )
Variables ¶
This section is empty.
Functions ¶
func NewFunctionsHandler ¶
func NewFunctionsHandler( cfg FunctionsHandlerConfig, donConfig *config.DONConfig, don handlers.DON, pendingRequestsCache hc.RequestCache[PendingSecretsRequest], allowlist OnchainAllowlist, userRateLimiter *hc.RateLimiter, nodeRateLimiter *hc.RateLimiter, lggr logger.Logger) handlers.Handler
func NewFunctionsHandlerFromConfig ¶ added in v2.4.0
Types ¶
type CombinedSecretsResponse ¶ added in v2.4.0
type CombinedSecretsResponse struct { SecretsResponseBase NodeResponses []*api.Message `json:"node_responses"` }
Gateway -> User response, which combines responses from several nodes
type FunctionsHandlerConfig ¶
type FunctionsHandlerConfig struct { OnchainAllowlistChainID string `json:"onchainAllowlistChainId"` // Not specifying OnchainAllowlist config disables allowlist checks OnchainAllowlist *OnchainAllowlistConfig `json:"onchainAllowlist"` // Not specifying RateLimiter config disables rate limiting UserRateLimiter *hc.RateLimiterConfig `json:"userRateLimiter"` NodeRateLimiter *hc.RateLimiterConfig `json:"nodeRateLimiter"` MaxPendingRequests uint32 `json:"maxPendingRequests"` RequestTimeoutMillis int64 `json:"requestTimeoutMillis"` }
type OnchainAllowlist ¶
type OnchainAllowlist interface { job.ServiceCtx Allow(common.Address) bool UpdateFromContract(ctx context.Context) error }
OnchainAllowlist maintains an allowlist of addresses fetched from the blockchain (EVM-only). Use UpdateFromContract() for a one-time update or set OnchainAllowlistConfig.UpdateFrequencySec for repeated updates. All methods are thread-safe.
func NewOnchainAllowlist ¶
func NewOnchainAllowlist(client evmclient.Client, config OnchainAllowlistConfig, lggr logger.Logger) (OnchainAllowlist, error)
type OnchainAllowlistConfig ¶ added in v2.4.0
type OnchainAllowlistConfig struct { // ContractAddress is required ContractAddress common.Address `json:"contractAddress"` ContractVersion uint32 `json:"contractVersion"` BlockConfirmations uint `json:"blockConfirmations"` // UpdateFrequencySec can be zero to disable periodic updates UpdateFrequencySec uint `json:"updateFrequencySec"` UpdateTimeoutSec uint `json:"updateTimeoutSec"` }
type PendingSecretsRequest ¶ added in v2.4.0
type PendingSecretsRequest struct {
// contains filtered or unexported fields
}
type SecretsListResponse ¶ added in v2.4.0
type SecretsListResponse struct { SecretsResponseBase Rows []SecretsListRow `json:"rows,omitempty"` }
type SecretsListRow ¶ added in v2.4.0
type SecretsResponseBase ¶ added in v2.4.0
type SecretsSetRequest ¶ added in v2.4.0
type SecretsSetResponse ¶ added in v2.4.0
type SecretsSetResponse struct {
SecretsResponseBase
}
Click to show internal directories.
Click to hide internal directories.