Documentation ¶
Overview ¶
Package storage provides a ScyllaDB storage implementation for managing key-value pairs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLatestBlock ¶
Types ¶
type NatsStorage ¶
type NatsStorage struct {
// contains filtered or unexported fields
}
func NewNatsStorage ¶
func NewNatsStorage(opts ...NatsStorageOptsFunc) *NatsStorage
func (*NatsStorage) Get ¶
func (s *NatsStorage) Get(id []byte) []byte
func (*NatsStorage) Has ¶
func (s *NatsStorage) Has(id []byte) bool
func (*NatsStorage) Scan ¶
func (s *NatsStorage) Scan(prefix []byte) [][]byte
NOTE: nats scan may take quite some time to execute because of the number of keys. nats add a default timeout of 5 seconds if we do not provide any timeout.
type NatsStorageOptions ¶
type NatsStorageOptions struct {
// contains filtered or unexported fields
}
type NatsStorageOptsFunc ¶
type NatsStorageOptsFunc func(*NatsStorageOptions)
func WithBucket ¶
func WithBucket(b string) NatsStorageOptsFunc
func WithToken ¶
func WithToken(b string) NatsStorageOptsFunc
func WithUrl ¶
func WithUrl(u string) NatsStorageOptsFunc
type PebbleStorage ¶
type PebbleStorage struct {
// contains filtered or unexported fields
}
func NewPebbleStorage ¶
func NewPebbleStorage(opts ...PebbleStorageOptsFunc) *PebbleStorage
func (*PebbleStorage) Get ¶
func (p *PebbleStorage) Get(id []byte) []byte
func (*PebbleStorage) Has ¶
func (p *PebbleStorage) Has(id []byte) bool
func (*PebbleStorage) Scan ¶
func (p *PebbleStorage) Scan(prefix []byte) [][]byte
type PebbleStorageOptions ¶
type PebbleStorageOptions struct {
// contains filtered or unexported fields
}
type PebbleStorageOptsFunc ¶
type PebbleStorageOptsFunc func(*PebbleStorageOptions)
type ScyllaStorage ¶
type ScyllaStorage struct {
// contains filtered or unexported fields
}
ScyllaStorage represents a storage handler for ScyllaDB.
func NewScyllaStorage ¶
func NewScyllaStorage() (*ScyllaStorage, error)
NewScyllaStorage creates a new instance of ScyllaStorage.
func (*ScyllaStorage) Get ¶
func (s *ScyllaStorage) Get(id gocql.UUID) ([]byte, error)
Get retrieves the value associated with the given key from ScyllaDB.
func (*ScyllaStorage) Has ¶
func (s *ScyllaStorage) Has(id gocql.UUID) (bool, error)
Has checks if the given key exists in ScyllaDB.
Click to show internal directories.
Click to hide internal directories.