Documentation ¶
Index ¶
- type LocalCache
- func (lc *LocalCache) Config(egrp *errgroup.Group) (err error)
- func (sc *LocalCache) Get(ctx context.Context, path, token string) (io.ReadCloser, error)
- func (lc *LocalCache) LaunchListener(ctx context.Context, egrp *errgroup.Group) (err error)
- func (lc *LocalCache) Register(ctx context.Context, router *gin.RouterGroup)
- func (lc *LocalCache) Stat(path, token string) (uint64, error)
- type LocalCacheOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalCache ¶
type LocalCache struct {
// contains filtered or unexported fields
}
func NewLocalCache ¶
func NewLocalCache(ctx context.Context, egrp *errgroup.Group, options ...LocalCacheOption) (lc *LocalCache, err error)
Create a local cache object
Launches background goroutines associated with the cache
func (*LocalCache) Config ¶
func (lc *LocalCache) Config(egrp *errgroup.Group) (err error)
Try to configure the local cache and launch the reconfigure goroutine
func (*LocalCache) Get ¶
func (sc *LocalCache) Get(ctx context.Context, path, token string) (io.ReadCloser, error)
Get path from the cache
func (*LocalCache) LaunchListener ¶
Launch the unix socket listener as a separate goroutine
func (*LocalCache) Register ¶
func (lc *LocalCache) Register(ctx context.Context, router *gin.RouterGroup)
Register the control & monitoring routines with Gin
type LocalCacheOption ¶
func WithDeferConfig ¶
func WithDeferConfig(deferConfig bool) LocalCacheOption
Create an option to defer the configuration of the local cache
Useful in cases where the cache should be created before the web interface is up -- but the web interface is needed to complete configuration.
Click to show internal directories.
Click to hide internal directories.