Versions in this module Expand all Collapse all v0 v0.0.1 Nov 11, 2026 Changes in this version + const DefaultIdleTimeout + const DefaultMaxTotalSize + const OpClear + const OpGet + const OpHello + const OpSet + const OpStatus + const OpStop + var ErrAlreadyRunning = errors.New("daemon is already running") + var Version = "v0.0.1" + func CacheKey(argv []string, keyEnv []string) string + func Run(ctx context.Context) error + func SocketPath(path string) (string, error) + type CLI struct + Clear struct{} + Daemon DaemonCmd + Debug bool + Exec ExecCmd + Socket string + Status struct{} + Stop struct{} + Version kong.VersionFlag + type Cache struct + func NewCache(maxTotal int64) *Cache + func (c *Cache) Clear() int + func (c *Cache) Get(key string, expires time.Duration) ([]Chunk, bool) + func (c *Cache) Len() int + func (c *Cache) Set(key, label string, chunks []Chunk, ttl time.Duration) bool + func (c *Cache) Stats() ([]StatusItem, int64) + func (c *Cache) Sweep() + type Chunk struct + Data []byte + Stream Stream + type Client struct + ServerPID int + ServerVersion string + func Dial(ctx context.Context, socket string) (*Client, error) + func DialOrStart(ctx context.Context, socket string) (*Client, error) + func (c *Client) Clear() (int, error) + func (c *Client) Close() error + func (c *Client) Get(key string, expires time.Duration) ([]Chunk, bool, error) + func (c *Client) Set(key, label string, chunks []Chunk, expires time.Duration) (bool, error) + func (c *Client) Status() (*Status, error) + func (c *Client) Stop() error + type DaemonCmd struct + IdleTimeout time.Duration + MaxTotalSize int64 + type ExecCmd struct + Command []string + Expires time.Duration + KeyEnv []string + MaxSize int64 + type ExitError struct + Code int + Err error + func (e *ExitError) Error() string + func (e *ExitError) Unwrap() error + type Request struct + Chunks []Chunk + Expires time.Duration + Key string + Label string + Op string + type Response struct + Chunks []Chunk + Cleared int + Error string + Hit bool + PID int + Status *Status + Stored bool + Version string + type Server struct + IdleTimeout time.Duration + MaxTotalSize int64 + Socket string + SweepPeriod time.Duration + func (s *Server) Run(ctx context.Context) error + type Status struct + Entries int + Items []StatusItem + PID int + Running bool + Socket string + TotalSize int64 + Uptime string + Version string + type StatusItem struct + Age string + Command string + ExpiresIn string + Size int64 + type Stream int + const Stderr + const Stdout