github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/features/extension/storage.go (about)

     1  package extension
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/v2fly/v2ray-core/v5/features"
     7  )
     8  
     9  type PersistentStorageEngine interface {
    10  	features.Feature
    11  	PersistentStorageEngine()
    12  	Put(ctx context.Context, key []byte, value []byte) error
    13  	Get(ctx context.Context, key []byte) ([]byte, error)
    14  	List(ctx context.Context, keyPrefix []byte) ([][]byte, error)
    15  }