bbolt

package
v1.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppCacheItem

type AppCacheItem struct {
	ID    string                   `json:"id"`
	Cache *models.ApplicationCache `json:"cache"`
}

AppCacheItem represents an application cache entry

type CacheDriver

type CacheDriver struct {
	ProjectCache sync.Map
	// contains filtered or unexported fields
}

CacheDriver implements CacheDBInterface using ApitoBolt

func GetBoltCacheDriver

func GetBoltCacheDriver(cfg *models.Config) (*CacheDriver, error)

func (*CacheDriver) Close

func (c *CacheDriver) Close() error

Close closes the BoltDB connection

func (*CacheDriver) Expire

func (c *CacheDriver) Expire(ctx context.Context, id string) error

Expire removes a key from cache and its related data

func (*CacheDriver) Get

func (c *CacheDriver) Get(ctx context.Context, id string) (interface{}, error)

Get retrieves a value from the cache

func (*CacheDriver) GetAppCache

func (c *CacheDriver) GetAppCache(ctx context.Context, projectID string) (*models.ApplicationCache, error)

GetAppCache retrieves application cache for a project

func (*CacheDriver) GetProject

func (c *CacheDriver) GetProject(ctx context.Context, projectID string) (*models.Project, error)

GetProject retrieves a project from cache

func (*CacheDriver) ListKeys

func (c *CacheDriver) ListKeys(ctx context.Context) ([]string, error)

ListKeys returns all keys in the cache

func (*CacheDriver) Put

func (c *CacheDriver) Put(ctx context.Context, id string, cache interface{}) error

Put stores a value in the cache with optional TTL

func (*CacheDriver) PutAppCache

func (c *CacheDriver) PutAppCache(ctx context.Context, projectID string, cache *models.ApplicationCache) error

PutAppCache stores application cache for a project

func (*CacheDriver) SaveProject

func (c *CacheDriver) SaveProject(ctx context.Context, project *models.Project) (*models.Project, error)

SaveProject stores a project in cache

type CacheExpiration

type CacheExpiration struct {
	ID         string `json:"id"`
	ExpireTime int64  `json:"expire_time"`
}

CacheExpiration represents an expiration entry

type CacheItem

type CacheItem struct {
	ID   string      `json:"id"`
	Data interface{} `json:"data"`
}

CacheItem represents a generic cache item

type ProjectItem

type ProjectItem struct {
	ID      string          `json:"id"`
	Project *models.Project `json:"project"`
}

ProjectItem represents a project cache entry

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL