backend.go 644 B

1234567891011121314151617181920212223
  1. package thermalbackend
  2. import (
  3. "context"
  4. "errors"
  5. "hth/internal/protocol6400"
  6. )
  7. var ErrReadOnly = errors.New("thermal replay backend is read-only")
  8. // Backend is the sole transaction surface used by the 6400 daemon path.
  9. // Implementations must serialize calls; the service also serializes them so a
  10. // single CPLD wire transaction is outstanding across all RPCs.
  11. type Backend interface {
  12. Kind() string
  13. Profile() string
  14. Open(context.Context) error
  15. Close() error
  16. SetTarget(context.Context, byte) error
  17. GetSnapshot(context.Context) (protocol6400.Snapshot, []byte, error)
  18. RunStimulus(context.Context, protocol6400.Stimulus) error
  19. }