Documentation
¶
Index ¶
Constants ¶
View Source
const ( Finalized finalizationType = iota None )
Variables ¶
View Source
var EmptyResponses = [][]byte{ []byte(`"0x"`), []byte(`null`), []byte(`{}`), []byte(`[]`), }
View Source
var ErrCacheNotFound = errors.New("not found in cache")
Functions ¶
This section is empty.
Types ¶
type BaseCacheProcessor ¶
type BaseCacheProcessor struct {
// contains filtered or unexported fields
}
func NewBaseCacheProcessor ¶
func NewBaseCacheProcessor( upstreamSupervisor upstreams.UpstreamSupervisor, cacheConfig *config.CacheConfig, storageRegistry *storages.StorageRegistry, ) (*BaseCacheProcessor, error)
func (*BaseCacheProcessor) Receive ¶
func (c *BaseCacheProcessor) Receive(ctx context.Context, chain chains.Chain, request protocol.RequestHolder) ([]byte, bool)
func (*BaseCacheProcessor) Store ¶
func (c *BaseCacheProcessor) Store( ctx context.Context, chain chains.Chain, request protocol.RequestHolder, response []byte, )
type CacheConnector ¶
type CachePolicy ¶
type CachePolicy struct {
// contains filtered or unexported fields
}
func NewCachePolicy ¶
func NewCachePolicy( upstreamSupervisor upstreams.UpstreamSupervisor, cacheConnector CacheConnector, policyConfig *config.CachePolicyConfig, ) *CachePolicy
type CacheProcessor ¶
type InMemoryConnector ¶
type InMemoryConnector struct {
// contains filtered or unexported fields
}
func NewInMemoryConnector ¶
func NewInMemoryConnector(id string, config *config.MemoryCacheConnectorConfig) (*InMemoryConnector, error)
func (*InMemoryConnector) Id ¶
func (i *InMemoryConnector) Id() string
func (*InMemoryConnector) Initialize ¶
func (i *InMemoryConnector) Initialize() error
type PostgresConnector ¶
type PostgresConnector struct {
// contains filtered or unexported fields
}
func NewPostgresConnector ¶
func NewPostgresConnector(id string, postgresCfg *config.PostgresCacheConnectorConfig, storageRegistry *storages.StorageRegistry) (*PostgresConnector, error)
func (*PostgresConnector) Id ¶
func (p *PostgresConnector) Id() string
func (*PostgresConnector) Initialize ¶
func (p *PostgresConnector) Initialize() error
type RedisConnector ¶
type RedisConnector struct {
// contains filtered or unexported fields
}
func NewRedisConnector ¶
func NewRedisConnector(id string, redisConfig *config.RedisCacheConnectorConfig, storageRegistry *storages.StorageRegistry) (*RedisConnector, error)
func (*RedisConnector) Id ¶
func (r *RedisConnector) Id() string
func (*RedisConnector) Initialize ¶
func (r *RedisConnector) Initialize() error
Click to show internal directories.
Click to hide internal directories.