Documentation ¶
Overview ¶
Package connection is a cache which may be used by the plugin to store connection specific data, for example credentials and hydrate function results
Index ¶
- type Cache
- type ConnectionCache
- func (c *ConnectionCache) Clear(ctx context.Context)
- func (c *ConnectionCache) Delete(ctx context.Context, key string)
- func (c *ConnectionCache) Get(ctx context.Context, key string) (interface{}, bool)
- func (c *ConnectionCache) Set(ctx context.Context, key string, value interface{}) error
- func (c *ConnectionCache) SetWithTTL(ctx context.Context, key string, value interface{}, ttl time.Duration) error
- type ForceImport
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
deprecated use ConnectionCache
func NewCache ¶
func NewCache(connectionCache *ConnectionCache) *Cache
type ConnectionCache ¶
type ConnectionCache struct {
// contains filtered or unexported fields
}
ConnectionCache is a simple cache wrapper - multiple connections use the same underlying cache (owned by the plugin) ConnectionCache modifies the cache keys to include the connection name and uses the underlying shared cache
func NewConnectionCache ¶
func NewConnectionCache(connectionName string, connectionCache *cache.Cache[any]) *ConnectionCache
func (*ConnectionCache) Clear ¶
func (c *ConnectionCache) Clear(ctx context.Context)
Clear deletes all cache items for this connection
func (*ConnectionCache) Get ¶
func (c *ConnectionCache) Get(ctx context.Context, key string) (interface{}, bool)
func (*ConnectionCache) Set ¶
func (c *ConnectionCache) Set(ctx context.Context, key string, value interface{}) error
func (*ConnectionCache) SetWithTTL ¶
type ForceImport ¶
type ForceImport string
ForceImport is a mechanism to ensure godoc can reference all required packages
type Manager ¶
type Manager struct {
Cache *Cache
}
deprecated use ConnectionCache
func NewManager ¶
func NewManager(connectionCache *ConnectionCache) *Manager
Click to show internal directories.
Click to hide internal directories.