mirror of
https://github.com/status-im/eth-rpc-proxy.git
synced 2026-08-31 03:31:14 +00:00
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"go-proxy-cache/internal/models"
|
||||
"github.com/status-im/proxy-common/models"
|
||||
)
|
||||
|
||||
// handleGet handles GET cache requests
|
||||
|
||||
@@ -12,10 +12,12 @@ import (
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zaptest"
|
||||
|
||||
"github.com/status-im/proxy-common/models"
|
||||
|
||||
"go-proxy-cache/internal/cache"
|
||||
"go-proxy-cache/internal/cache/service"
|
||||
"go-proxy-cache/internal/interfaces/mock"
|
||||
"go-proxy-cache/internal/models"
|
||||
localModels "go-proxy-cache/internal/models"
|
||||
"go-proxy-cache/internal/utils"
|
||||
)
|
||||
|
||||
@@ -67,7 +69,7 @@ func setupMockCacheClassifier(ctrl *gomock.Controller) *mock.MockCacheRulesClass
|
||||
|
||||
// Set up common expectations
|
||||
mockClassifier.EXPECT().GetTtl(gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(
|
||||
func(chain, network string, request *models.JSONRPCRequest) models.CacheInfo {
|
||||
func(chain, network string, request *localModels.JSONRPCRequest) models.CacheInfo {
|
||||
switch request.Method {
|
||||
case "eth_getBlockByHash":
|
||||
return models.CacheInfo{TTL: 86400 * time.Second, CacheType: "permanent"}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package httpserver
|
||||
|
||||
import "go-proxy-cache/internal/models"
|
||||
import "github.com/status-im/proxy-common/models"
|
||||
|
||||
// CacheRequest represents a cache operation request
|
||||
type CacheRequest struct {
|
||||
|
||||
Reference in New Issue
Block a user