Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { PullFromCache(key string, dest interface{}) error PushToCache(key string, src interface{}) error List(opts ...microstore.ListOption) ([]string, error) Delete(key string, opts ...microstore.DeleteOption) error Close() error }
Cache handles key value operations on caches It, and the interfaces derived from it, are currently being used for building caches around go-micro stores, encoding the data in the messsagepack format.
type Config ¶ added in v2.13.0
type Config struct { Store string `mapstructure:"cache_store"` Nodes []string `mapstructure:"cache_nodes"` Database string `mapstructure:"cache_database"` Table string `mapstructure:"cache_table"` TTL time.Duration `mapstructure:"cache_ttl"` Size int `mapstructure:"cache_size"` DisablePersistence bool `mapstructure:"cache_disable_persistence"` AuthUsername string `mapstructure:"cache_auth_username"` AuthPassword string `mapstructure:"cache_auth_password"` }
Config contains the configuring for a cache
type CreateHomeCache ¶
type CreateHomeCache interface { Cache RemoveCreateHome(res *provider.ResourceId) GetKey(userID *userpb.UserId) string }
CreateHomeCache handles removing keys from a create home cache
func GetCreateHomeCache ¶
func GetCreateHomeCache(cfg Config) CreateHomeCache
GetCreateHomeCache will return an existing CreateHomeCache for the given store, nodes, database and table If it does not exist yet it will be created, different TTLs are ignored
func NewCreateHomeCache ¶
func NewCreateHomeCache(cfg Config) CreateHomeCache
NewCreateHomeCache creates a new CreateHomeCache
type CreatePersonalSpaceCache ¶ added in v2.13.0
CreatePersonalSpaceCache handles removing keys from a create home cache
func GetCreatePersonalSpaceCache ¶ added in v2.13.0
func GetCreatePersonalSpaceCache(cfg Config) CreatePersonalSpaceCache
GetCreatePersonalSpaceCache will return an existing CreatePersonalSpaceCache for the given store, nodes, database and table If it does not exist yet it will be created, different TTLs are ignored
func NewCreatePersonalSpaceCache ¶ added in v2.13.0
func NewCreatePersonalSpaceCache(cfg Config) CreatePersonalSpaceCache
NewCreatePersonalSpaceCache creates a new CreatePersonalSpaceCache
type FileMetadataCache ¶ added in v2.13.0
FileMetadataCache handles file metadata
func GetFileMetadataCache ¶ added in v2.13.0
func GetFileMetadataCache(cfg Config) FileMetadataCache
GetFileMetadataCache will return an existing GetFileMetadataCache for the given store, nodes, database and table If it does not exist yet it will be created, different TTLs are ignored
func NewFileMetadataCache ¶ added in v2.13.0
func NewFileMetadataCache(cfg Config) FileMetadataCache
NewFileMetadataCache creates a new FileMetadataCache
type ProviderCache ¶
type ProviderCache interface { Cache RemoveListStorageProviders(res *provider.ResourceId) GetKey(userID *userpb.UserId, spaceID string) string }
ProviderCache handles removing keys from a storage provider cache
func GetProviderCache ¶
func GetProviderCache(cfg Config) ProviderCache
GetProviderCache will return an existing ProviderCache for the given store, nodes, database and table If it does not exist yet it will be created, different TTLs are ignored
func NewProviderCache ¶
func NewProviderCache(cfg Config) ProviderCache
NewProviderCache creates a new ProviderCache
type StatCache ¶
type StatCache interface { Cache RemoveStat(userID *userpb.UserId, res *provider.ResourceId) RemoveStatContext(ctx context.Context, userID *userpb.UserId, res *provider.ResourceId) GetKey(userID *userpb.UserId, ref *provider.Reference, metaDataKeys, fieldMaskPaths []string) string }
StatCache handles removing keys from a stat cache
func GetStatCache ¶
GetStatCache will return an existing StatCache for the given store, nodes, database and table If it does not exist yet it will be created, different TTLs are ignored