Documentation ¶
Overview ¶
Package mock provides utilities for configuring a mock (in-memory) shiroclient.
Index ¶
Constants ¶
const ( // Debug sets the plugin log level to debug Debug mockint.LogLevel = iota // Info sets the plugin log level to info Info // Warn sets the plugin log level to warning Warn // Error sets the plugin log level to error Error )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
Option is a mock client configuration function
func WithLogLevel ¶
WithLogLevel sets the log level of the plugin log writer to the supplied level.
func WithLogWriter ¶
WithLogWriter sets the plugin's log destination to the supplied io.Writer. By default, the plugin writes to os.Stdout.
func WithPluginPath ¶
WithPluginPath sets the path to the HCP plugin file. By default, the plugin is loaded from the location specified by the SUBSTRATEHCP_FILE environment variable.
func WithSnapshotReader ¶
WithSnapshotReader initializes the state of the mock client by reading a snapshot of previous state from the supplied io.Reader that was previously created with the Snapshot method.