Documentation ¶
Overview ¶
Package fakertmr defines a configfsi.Client for faking TSM behavior. The current implementation only supports TDX.
Index ¶
- type RtmrSubsystem
- func (r *RtmrSubsystem) MkdirTemp(dir, pattern string) (string, error)
- func (r *RtmrSubsystem) ReadDir(dirname string) ([]os.DirEntry, error)
- func (r *RtmrSubsystem) ReadFile(name string) ([]byte, error)
- func (r *RtmrSubsystem) RemoveAll(path string) error
- func (r *RtmrSubsystem) WriteFile(name string, content []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RtmrSubsystem ¶
type RtmrSubsystem struct { // WriteAttr called on any WriteFile to an attribute. WriteAttr func(dirname string, attr string, contents []byte, indexMap map[int]bool) error // ReadAttr is called on any non-InAddr key. ReadAttr func(dirname string, attr string) ([]byte, error) // Random is the source of randomness to use for MkdirTemp Random io.Reader // We use a temp folder to store the rtmr entries. // The path to the fake rtmr subsystem. Path string // contains filtered or unexported fields }
RtmrSubsystem represents a fake configfs-tsm rtmr subsystem.
func CreateRtmrSubsystem ¶
func CreateRtmrSubsystem(tempDir string) *RtmrSubsystem
CreateRtmrSubsystem creates a new rtmr subsystem. The current subsystem only supports TDX.
func (*RtmrSubsystem) MkdirTemp ¶
func (r *RtmrSubsystem) MkdirTemp(dir, pattern string) (string, error)
MkdirTemp creates a new temporary directory in the rtmr subsystem.
func (*RtmrSubsystem) ReadDir ¶ added in v0.3.1
func (r *RtmrSubsystem) ReadDir(dirname string) ([]os.DirEntry, error)
ReadDir reads the directory named by dirname and returns a list of directory entries sorted by filename.
func (*RtmrSubsystem) ReadFile ¶
func (r *RtmrSubsystem) ReadFile(name string) ([]byte, error)
ReadFile reads the contents of a file in the rtmr subsystem.
func (*RtmrSubsystem) RemoveAll ¶
func (r *RtmrSubsystem) RemoveAll(path string) error
RemoveAll implements configfsi.Client.
Click to show internal directories.
Click to hide internal directories.