Documentation
¶
Index ¶
- Variables
- 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) ObserveItemAddedBytes(itemType string, size int)
- 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 CopyParams
- type DataType
- type FSStore
- func (s *FSStore) Copy(ctx context.Context, params *CopyParams) error
- func (s *FSStore) DeleteBeaconBadBlob(ctx context.Context, location string) error
- func (s *FSStore) DeleteBeaconBadBlock(ctx context.Context, location string) error
- func (s *FSStore) DeleteBeaconBlock(ctx context.Context, location string) error
- func (s *FSStore) DeleteBeaconState(ctx context.Context, location string) error
- func (s *FSStore) DeleteExecutionBadBlock(ctx context.Context, location string) error
- func (s *FSStore) DeleteExecutionBlockTrace(ctx context.Context, location string) error
- func (s *FSStore) Exists(ctx context.Context, location string) (bool, error)
- func (s *FSStore) GetBeaconBadBlob(ctx context.Context, location string) (*[]byte, error)
- func (s *FSStore) GetBeaconBadBlobURL(ctx context.Context, params *GetURLParams) (string, error)
- func (s *FSStore) GetBeaconBadBlock(ctx context.Context, location string) (*[]byte, error)
- func (s *FSStore) GetBeaconBadBlockURL(ctx context.Context, params *GetURLParams) (string, error)
- func (s *FSStore) GetBeaconBlock(ctx context.Context, location string) (*[]byte, error)
- func (s *FSStore) GetBeaconBlockURL(ctx context.Context, params *GetURLParams) (string, error)
- func (s *FSStore) GetBeaconState(ctx context.Context, location string) (*[]byte, error)
- func (s *FSStore) GetBeaconStateURL(ctx context.Context, params *GetURLParams) (string, error)
- func (s *FSStore) GetExecutionBadBlock(ctx context.Context, location string) (*[]byte, error)
- func (s *FSStore) GetExecutionBadBlockURL(ctx context.Context, params *GetURLParams) (string, error)
- func (s *FSStore) GetExecutionBlockTrace(ctx context.Context, location string) (*[]byte, error)
- func (s *FSStore) GetExecutionBlockTraceURL(ctx context.Context, params *GetURLParams) (string, error)
- func (s *FSStore) GetStorageHandshakeToken(ctx context.Context, node string) (string, error)
- func (s *FSStore) Healthy(ctx context.Context) error
- func (s *FSStore) PathPrefix() string
- func (s *FSStore) PreferURLs() bool
- func (s *FSStore) SaveBeaconBadBlob(ctx context.Context, params *SaveParams) (string, error)
- func (s *FSStore) SaveBeaconBadBlock(ctx context.Context, params *SaveParams) (string, error)
- func (s *FSStore) SaveBeaconBlock(ctx context.Context, params *SaveParams) (string, error)
- func (s *FSStore) SaveBeaconState(ctx context.Context, params *SaveParams) (string, error)
- func (s *FSStore) SaveExecutionBadBlock(ctx context.Context, params *SaveParams) (string, error)
- func (s *FSStore) SaveExecutionBlockTrace(ctx context.Context, params *SaveParams) (string, error)
- func (s *FSStore) SaveStorageHandshakeToken(ctx context.Context, node, data string) error
- func (s *FSStore) StorageHandshakeTokenExists(ctx context.Context, node string) (bool, error)
- type FSStoreConfig
- type GetURLParams
- type Options
- type S3Store
- func (s *S3Store) Copy(ctx context.Context, params *CopyParams) error
- func (s *S3Store) DeleteBeaconBadBlob(ctx context.Context, location string) error
- func (s *S3Store) DeleteBeaconBadBlock(ctx context.Context, location string) error
- func (s *S3Store) DeleteBeaconBlock(ctx context.Context, location string) error
- 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) GetBeaconBadBlob(ctx context.Context, location string) (*[]byte, error)
- func (s *S3Store) GetBeaconBadBlobURL(ctx context.Context, params *GetURLParams) (string, error)
- func (s *S3Store) GetBeaconBadBlock(ctx context.Context, location string) (*[]byte, error)
- func (s *S3Store) GetBeaconBadBlockURL(ctx context.Context, params *GetURLParams) (string, error)
- func (s *S3Store) GetBeaconBlock(ctx context.Context, location string) (*[]byte, error)
- func (s *S3Store) GetBeaconBlockURL(ctx context.Context, params *GetURLParams) (string, error)
- func (s *S3Store) GetBeaconState(ctx context.Context, location string) (*[]byte, error)
- func (s *S3Store) GetBeaconStateURL(ctx context.Context, params *GetURLParams) (string, error)
- func (s *S3Store) GetExecutionBadBlock(ctx context.Context, location string) (*[]byte, error)
- func (s *S3Store) GetExecutionBadBlockURL(ctx context.Context, params *GetURLParams) (string, error)
- func (s *S3Store) GetExecutionBlockTrace(ctx context.Context, location string) (*[]byte, error)
- func (s *S3Store) GetExecutionBlockTraceURL(ctx context.Context, params *GetURLParams) (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) SaveBeaconBadBlob(ctx context.Context, params *SaveParams) (string, error)
- func (s *S3Store) SaveBeaconBadBlock(ctx context.Context, params *SaveParams) (string, error)
- func (s *S3Store) SaveBeaconBlock(ctx context.Context, params *SaveParams) (string, error)
- func (s *S3Store) SaveBeaconState(ctx context.Context, params *SaveParams) (string, error)
- func (s *S3Store) SaveExecutionBadBlock(ctx context.Context, params *SaveParams) (string, error)
- func (s *S3Store) SaveExecutionBlockTrace(ctx context.Context, params *SaveParams) (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 SaveParams
- type Store
- type Type
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func IsValidStoreType ¶
Types ¶
type BasicMetrics ¶
type BasicMetrics struct {
// contains filtered or unexported fields
}
func GetBasicMetricsInstance ¶ added in v0.0.17
func GetBasicMetricsInstance(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) ObserveItemAddedBytes ¶ added in v0.0.11
func (m *BasicMetrics) ObserveItemAddedBytes(itemType string, size int)
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 CopyParams ¶ added in v0.0.27
type DataType ¶
type DataType string
const ( UnknownDataType DataType = "unknown" BeaconStateDataType DataType = "beacon_state" BeaconBlockDataType DataType = "beacon_block" BeaconBadBlockDataType DataType = "beacon_bad_block" BeaconBadBlobDataType DataType = "beacon_bad_blob" BlockTraceDataType DataType = "execution_block_trace" BadBlockDataType DataType = "execution_bad_block" )
type FSStore ¶ added in v0.0.17
type FSStore struct {
// contains filtered or unexported fields
}
func NewFSStore ¶ added in v0.0.17
func NewFSStore(namespace string, log logrus.FieldLogger, config *FSStoreConfig, opts *Options) (*FSStore, error)
func (*FSStore) Copy ¶ added in v0.0.27
func (s *FSStore) Copy(ctx context.Context, params *CopyParams) error
func (*FSStore) DeleteBeaconBadBlob ¶ added in v0.0.17
func (*FSStore) DeleteBeaconBadBlock ¶ added in v0.0.17
func (*FSStore) DeleteBeaconBlock ¶ added in v0.0.17
func (*FSStore) DeleteBeaconState ¶ added in v0.0.17
func (*FSStore) DeleteExecutionBadBlock ¶ added in v0.0.17
func (*FSStore) DeleteExecutionBlockTrace ¶ added in v0.0.17
func (*FSStore) GetBeaconBadBlob ¶ added in v0.0.17
func (*FSStore) GetBeaconBadBlobURL ¶ added in v0.0.17
func (*FSStore) GetBeaconBadBlock ¶ added in v0.0.17
func (*FSStore) GetBeaconBadBlockURL ¶ added in v0.0.17
func (*FSStore) GetBeaconBlock ¶ added in v0.0.17
func (*FSStore) GetBeaconBlockURL ¶ added in v0.0.17
func (*FSStore) GetBeaconState ¶ added in v0.0.17
func (*FSStore) GetBeaconStateURL ¶ added in v0.0.17
func (*FSStore) GetExecutionBadBlock ¶ added in v0.0.17
func (*FSStore) GetExecutionBadBlockURL ¶ added in v0.0.17
func (*FSStore) GetExecutionBlockTrace ¶ added in v0.0.17
func (*FSStore) GetExecutionBlockTraceURL ¶ added in v0.0.17
func (*FSStore) GetStorageHandshakeToken ¶ added in v0.0.17
func (*FSStore) PathPrefix ¶ added in v0.0.17
func (*FSStore) PreferURLs ¶ added in v0.0.17
func (*FSStore) SaveBeaconBadBlob ¶ added in v0.0.17
func (*FSStore) SaveBeaconBadBlock ¶ added in v0.0.17
func (*FSStore) SaveBeaconBlock ¶ added in v0.0.17
func (*FSStore) SaveBeaconState ¶ added in v0.0.17
func (*FSStore) SaveExecutionBadBlock ¶ added in v0.0.17
func (*FSStore) SaveExecutionBlockTrace ¶ added in v0.0.17
func (*FSStore) SaveStorageHandshakeToken ¶ added in v0.0.17
type FSStoreConfig ¶ added in v0.0.17
type FSStoreConfig struct {
BasePath string `yaml:"base_path"`
}
type GetURLParams ¶ added in v0.0.25
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) Copy ¶ added in v0.0.27
func (s *S3Store) Copy(ctx context.Context, params *CopyParams) error
func (*S3Store) DeleteBeaconBadBlob ¶ added in v0.0.16
func (*S3Store) DeleteBeaconBadBlock ¶ added in v0.0.16
func (*S3Store) DeleteBeaconBlock ¶ added in v0.0.16
func (*S3Store) DeleteBeaconState ¶
func (*S3Store) DeleteExecutionBadBlock ¶
func (*S3Store) DeleteExecutionBlockTrace ¶
func (*S3Store) GetBeaconBadBlob ¶ added in v0.0.16
func (*S3Store) GetBeaconBadBlobURL ¶ added in v0.0.16
func (*S3Store) GetBeaconBadBlock ¶ added in v0.0.16
func (*S3Store) GetBeaconBadBlockURL ¶ added in v0.0.16
func (*S3Store) GetBeaconBlock ¶ added in v0.0.16
func (*S3Store) GetBeaconBlockURL ¶ added in v0.0.16
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) SaveBeaconBadBlob ¶ added in v0.0.16
func (*S3Store) SaveBeaconBadBlock ¶ added in v0.0.16
func (*S3Store) SaveBeaconBlock ¶ added in v0.0.16
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 SaveParams ¶ added in v0.0.25
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)
// Copy copies a file from one location to another
Copy(ctx context.Context, params *CopyParams) 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, params *SaveParams) (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, params *GetURLParams) (string, error)
// DeleteBeaconState deletes a beacon state from the store
DeleteBeaconState(ctx context.Context, location string) error
// SaveBeaconBlock saves a beacon block to the store
SaveBeaconBlock(ctx context.Context, params *SaveParams) (string, error)
// GetBeaconBlock fetches a beacon block from the store
GetBeaconBlock(ctx context.Context, location string) (*[]byte, error)
// GetBeaconBlockURL returns a URL for the beacon block
GetBeaconBlockURL(ctx context.Context, params *GetURLParams) (string, error)
// DeleteBeaconBlock deletes a beacon block from the store
DeleteBeaconBlock(ctx context.Context, location string) error
// SaveBeaconBadBlock saves a beacon bad block to the store
SaveBeaconBadBlock(ctx context.Context, params *SaveParams) (string, error)
// GetBeaconBadBlock fetches a beacon bad block from the store
GetBeaconBadBlock(ctx context.Context, location string) (*[]byte, error)
// GetBeaconBadBlockURL returns a URL for the beacon bad block
GetBeaconBadBlockURL(ctx context.Context, params *GetURLParams) (string, error)
// DeleteBeaconBadBlock deletes a beacon bad block from the store
DeleteBeaconBadBlock(ctx context.Context, location string) error
// SaveBeaconBadBlob saves a beacon bad block to the store
SaveBeaconBadBlob(ctx context.Context, params *SaveParams) (string, error)
// GetBeaconBadBlob fetches a beacon bad block from the store
GetBeaconBadBlob(ctx context.Context, location string) (*[]byte, error)
// GetBeaconBadBlobURL returns a URL for the beacon bad block
GetBeaconBadBlobURL(ctx context.Context, params *GetURLParams) (string, error)
// DeleteBeaconBadBlob deletes a beacon bad block from the store
DeleteBeaconBadBlob(ctx context.Context, location string) error
// SaveExecutionBlockTrace saves an execution block trace to the store
SaveExecutionBlockTrace(ctx context.Context, params *SaveParams) (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, params *GetURLParams) (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, params *SaveParams) (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, params *GetURLParams) (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.
func NewMockS3Store ¶ added in v0.0.15
Click to show internal directories.
Click to hide internal directories.