Documentation
¶
Overview ¶
Package source abstracts where ccsession reads sessions from, so a second backend can be added without changing the list/preview/resume wiring.
Index ¶
Constants ¶
View Source
const EnvVar = "CCSESSION_SOURCE"
EnvVar selects the backend and is inherited by the fzf subprocesses via os.Environ() (see cmd/ccsession/main.go), so every re-invocation resolves the same source.
Variables ¶
This section is empty.
Functions ¶
func Names ¶
func Names() []string
Names lists the valid backend names (excluding the empty default).
Types ¶
type Source ¶
type Source interface {
Name() string
Scan() ([]*session.Session, error)
ScanFiltered(allow map[string]struct{}) ([]*session.Session, error)
FindByID(id string) (*session.Session, error)
GrepKeys(query string, regex bool) (map[string]struct{}, error)
ResumeSpec(s *session.Session) (bin string, args []string, err error)
}
Click to show internal directories.
Click to hide internal directories.