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) ObserveItemRemoved(itemType string)
- func (m *BasicMetrics) ObserveItemRetreived(itemType string)
- func (m *BasicMetrics) ObserveItemStored(itemType string, count int)
- type Config
- type DataType
- type FileSystem
- type FileSystemConfig
- type MemoryStore
- type Options
- type S3Store
- type S3StoreConfig
- 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 NewBasicMetrics ¶
func NewBasicMetrics(namespace, storeType string, enabled bool) *BasicMetrics
func (*BasicMetrics) ObserveCacheHit ¶ added in v0.0.7
func (m *BasicMetrics) ObserveCacheHit(itemType string)
func (*BasicMetrics) ObserveCacheMiss ¶ added in v0.0.7
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)
type Config ¶
type Config struct { Type Type `yaml:"type"` Config yaml.RawMessage `yaml:"config"` }
type FileSystem ¶
type FileSystem struct {
// contains filtered or unexported fields
}
func NewFileSystem ¶
func NewFileSystem(namespace string, config FileSystemConfig, opts *Options) (*FileSystem, error)
NewFileSystem creates a new FileSystem instance with the specified base directory.
func (*FileSystem) DeleteFrame ¶
func (fs *FileSystem) DeleteFrame(ctx context.Context, id string) error
type FileSystemConfig ¶
type FileSystemConfig struct {
BaseDir string `yaml:"base_dir"`
}
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶
func NewMemoryStore(namespace string, log logrus.FieldLogger, opts *Options) *MemoryStore
func (*MemoryStore) DeleteFrame ¶
func (s *MemoryStore) DeleteFrame(ctx context.Context, id string) error
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.
type S3StoreConfig ¶
type Store ¶
type Store interface { // SaveFrame saves a frame to the store SaveFrame(ctx context.Context, frame *types.Frame) error // GetFrame fetches a frame from the store GetFrame(ctx context.Context, id string) (*types.Frame, error) // Delete deletes a frame from the store DeleteFrame(ctx context.Context, id string) error }
Store is an interface for different persistence implementations.
Click to show internal directories.
Click to hide internal directories.