Documentation
¶
Overview ¶
Package stepkv implements a tiny loopback HTTP key/value API backed by an in-memory TTL cache. It is intended for optional per-SSH-run scratch state (see honey cue-exec kv_tunnel).
Index ¶
- Variables
- type Session
- func (s *Session) Close() error
- func (s *Session) Delete(key string) error
- func (s *Session) Get(key string) (value string, found bool, err error)
- func (s *Session) LocalBaseURL() string
- func (s *Session) LocalTCPAddr() string
- func (s *Session) Put(key, value string) error
- func (s *Session) Token() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadKey = errors.New("stepkv: bad key")
ErrBadKey is returned when a key is empty, too long, contains '/', or is reserved.
View Source
var ErrValueTooLong = errors.New("stepkv: value too long")
ErrValueTooLong is returned when a value exceeds maxValueLen.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is one loopback HTTP listener + ttlcache instance + auth token.
func (*Session) LocalBaseURL ¶
LocalBaseURL is the operator-side URL (loopback) for this session.
func (*Session) LocalTCPAddr ¶
LocalTCPAddr returns host:port for dialing the loopback listener (no scheme).
Click to show internal directories.
Click to hide internal directories.