Documentation ¶
Index ¶
- Variables
- func GzipCompress(data []byte) ([]byte, error)
- func GzipDecompress(data []byte) ([]byte, error)
- func IsValidStoreType(st Type) bool
- type BasicMetrics
- func (m *BasicMetrics) ObserveCacheHit(itemType string)
- func (m *BasicMetrics) ObserveCacheMiss(itemType string)
- func (m *BasicMetrics) ObserveItemAdded(itemType string)
- func (m *BasicMetrics) ObserveItemRemoved(itemType string)
- func (m *BasicMetrics) ObserveItemRetreived(itemType string)
- func (m *BasicMetrics) ObserveItemStored(itemType string, count int)
- func (m *BasicMetrics) ObserveItemURLRetreived(itemType string)
- type Config
- type DataType
- type Options
- type S3Store
- func (s *S3Store) DeleteBeaconState(ctx context.Context, location string) error
- func (s *S3Store) DeleteExecutionBadBlock(ctx context.Context, location string) error
- func (s *S3Store) DeleteExecutionBlockTrace(ctx context.Context, location string) error
- func (s *S3Store) Exists(ctx context.Context, location string) (bool, error)
- func (s *S3Store) GetBeaconState(ctx context.Context, location string) (*[]byte, error)
- func (s *S3Store) GetBeaconStateURL(ctx context.Context, location string, expiry int) (string, error)
- func (s *S3Store) GetExecutionBadBlock(ctx context.Context, location string) (*[]byte, error)
- func (s *S3Store) GetExecutionBadBlockURL(ctx context.Context, location string, expiry int) (string, error)
- func (s *S3Store) GetExecutionBlockTrace(ctx context.Context, location string) (*[]byte, error)
- func (s *S3Store) GetExecutionBlockTraceURL(ctx context.Context, location string, expiry int) (string, error)
- func (s *S3Store) GetRaw(ctx context.Context, location string) (*bytes.Buffer, error)
- func (s *S3Store) GetStorageHandshakeToken(ctx context.Context, node string) (string, error)
- func (s *S3Store) Healthy(ctx context.Context) error
- func (s *S3Store) PathPrefix() string
- func (s *S3Store) PreferURLs() bool
- func (s *S3Store) SaveBeaconState(ctx context.Context, data *[]byte, location string) (string, error)
- func (s *S3Store) SaveExecutionBadBlock(ctx context.Context, data *[]byte, location string) (string, error)
- func (s *S3Store) SaveExecutionBlockTrace(ctx context.Context, data *[]byte, location string) (string, error)
- func (s *S3Store) SaveStorageHandshakeToken(ctx context.Context, node, data string) error
- func (s *S3Store) StorageHandshakeTokenExists(ctx context.Context, node string) (bool, error)
- type S3StoreConfig
- type Store
- type Type
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GzipCompress ¶
func GzipDecompress ¶
func IsValidStoreType ¶
Types ¶
type BasicMetrics ¶
type BasicMetrics struct {
// contains filtered or unexported fields
}
func NewBasicMetrics ¶
func NewBasicMetrics(namespace, storeType string, enabled bool) *BasicMetrics
func (*BasicMetrics) ObserveCacheHit ¶
func (m *BasicMetrics) ObserveCacheHit(itemType string)
func (*BasicMetrics) ObserveCacheMiss ¶
func (m *BasicMetrics) ObserveCacheMiss(itemType string)
func (*BasicMetrics) ObserveItemAdded ¶
func (m *BasicMetrics) ObserveItemAdded(itemType string)
func (*BasicMetrics) ObserveItemRemoved ¶
func (m *BasicMetrics) ObserveItemRemoved(itemType string)
func (*BasicMetrics) ObserveItemRetreived ¶
func (m *BasicMetrics) ObserveItemRetreived(itemType string)
func (*BasicMetrics) ObserveItemStored ¶
func (m *BasicMetrics) ObserveItemStored(itemType string, count int)
func (*BasicMetrics) ObserveItemURLRetreived ¶ added in v0.0.6
func (m *BasicMetrics) ObserveItemURLRetreived(itemType string)
type Config ¶
type Config struct { Type Type `yaml:"type"` Config yaml.RawMessage `yaml:"config"` }
type Options ¶
type Options struct {
MetricsEnabled bool
}
func DefaultOptions ¶
func DefaultOptions() *Options
func (*Options) SetMetricsEnabled ¶
func (*Options) WithMetricsDisabled ¶
func (*Options) WithMetricsEnabled ¶
type S3Store ¶
type S3Store struct {
// contains filtered or unexported fields
}
func NewS3Store ¶
func NewS3Store(namespace string, log logrus.FieldLogger, config *S3StoreConfig, opts *Options) (*S3Store, error)
NewS3Store creates a new S3Store instance with the specified AWS configuration, bucket name, and key prefix.
func (*S3Store) DeleteBeaconState ¶
func (*S3Store) DeleteExecutionBadBlock ¶
func (*S3Store) DeleteExecutionBlockTrace ¶
func (*S3Store) GetBeaconState ¶
func (*S3Store) GetBeaconStateURL ¶ added in v0.0.6
func (*S3Store) GetExecutionBadBlock ¶
func (*S3Store) GetExecutionBadBlockURL ¶ added in v0.0.6
func (*S3Store) GetExecutionBlockTrace ¶
func (*S3Store) GetExecutionBlockTraceURL ¶ added in v0.0.6
func (*S3Store) GetStorageHandshakeToken ¶
func (*S3Store) PathPrefix ¶
func (*S3Store) PreferURLs ¶ added in v0.0.6
func (*S3Store) SaveBeaconState ¶
func (*S3Store) SaveExecutionBadBlock ¶
func (*S3Store) SaveExecutionBlockTrace ¶
func (*S3Store) SaveStorageHandshakeToken ¶
type S3StoreConfig ¶
type S3StoreConfig struct { Endpoint string `yaml:"endpoint"` Region string `yaml:"region"` BucketName string `yaml:"bucket_name"` KeyPrefix string `yaml:"key_prefix"` AccessKey string `yaml:"access_key"` AccessSecret string `yaml:"access_secret"` UsePathStyle bool `yaml:"use_path_style"` PreferURLs bool `yaml:"prefer_urls"` }
type Store ¶
type Store interface { // Healthy checks if the store is healthy Healthy(ctx context.Context) error // Exists checks if the file exists in the store Exists(ctx context.Context, location string) (bool, error) // StorageHandshakeTokenExists checks if a storage handshake token exists in the store StorageHandshakeTokenExists(ctx context.Context, node string) (bool, error) // SaveStorageHandshakeToken saves a storage handshake token to the store SaveStorageHandshakeToken(ctx context.Context, node, data string) error // GetStorageHandshake fetches a storage handshake token from the store GetStorageHandshakeToken(ctx context.Context, node string) (string, error) // SaveBeaconState saves a beacon state to the store SaveBeaconState(ctx context.Context, data *[]byte, location string) (string, error) // GetBeaconState fetches a beacon state from the store GetBeaconState(ctx context.Context, location string) (*[]byte, error) // GetBeaconStateURL returns a URL for the beacon state GetBeaconStateURL(ctx context.Context, location string, expiry int) (string, error) // DeleteBeaconState deletes a beacon state from the store DeleteBeaconState(ctx context.Context, location string) error // SaveExecutionBlockTrace saves an execution block trace to the store SaveExecutionBlockTrace(ctx context.Context, data *[]byte, location string) (string, error) // GetExecutionBlockTrace fetches an execution block trace from the store GetExecutionBlockTrace(ctx context.Context, location string) (*[]byte, error) // GetExecutionBlockTraceURL returns a URL for the execution block trace GetExecutionBlockTraceURL(ctx context.Context, location string, expiry int) (string, error) // DeleteExecutionBlockTrace deletes an execution block trace from the store DeleteExecutionBlockTrace(ctx context.Context, location string) error // SaveExecutionBadBlock saves an execution bad block to the store SaveExecutionBadBlock(ctx context.Context, data *[]byte, location string) (string, error) // GetExecutionBadBlock fetches an execution bad block from the store GetExecutionBadBlock(ctx context.Context, location string) (*[]byte, error) // GetExecutionBadBlockURL returns a URL for the execution bad block GetExecutionBadBlockURL(ctx context.Context, location string, expiry int) (string, error) // DeleteExecutionBadBlock deletes an execution bad block from the store DeleteExecutionBadBlock(ctx context.Context, location string) error // PathPrefix returns the path prefix for the store PathPrefix() string // PreferURLs returns if the store prefers URLs for serving data PreferURLs() bool }
Store is an interface for different persistence implementations.
Click to show internal directories.
Click to hide internal directories.