package
0.0.0-20210519151710-e93c592abc71
Repository: https://github.com/congop/execstub.git
Documentation: pkg.go.dev

# Functions

AdaptFuncsToCmdStub returns a CmdStub which will use a list of function to procudes the execution outcomes.
AdaptOutcomesToCmdStub returns a CmdStub which will yield the given outcomes.
AdaptOutcomeToCmdStub returns a StubFunc which will return the given outcome.
CfgDefaultTimeout return default value of timeout in not provided.
CmdConfigForCommand loads the configuration for the given executable identified by its path.
CmdConfigLoadedFromFile loads the configuration from the given file path.
CmdConfigTmpl returns the template used to generate stub cmd configuration.
EffectuateAlternativeExecOutcome effectuates an alternative outcome to the configured one for test helper processes.
EffectuateConfiguredExecOutcome effectuates the configured static or dynamic outcome for test helper processes.
EffectuateDynamicOutcome uses IPC to request execution outcome from running test.
ExecOutcomeDecoderFunc decodes an exec-outcome from the given reader.
ExecOutcomeEncoderFunc return an encoder which can write exec outcome representation into the writer.
NewStubRequestDirRepo creates a new stubbing request repo given the data directory.
ReadStubbingResponseFromNamedPipe reads the stubbing outcome from the named pipe.
RecordingExecutions adds request recording feature to the given StubFunc.
SettingsDynaStubCmdDiscoveredByPath constructs a new Settings for dynamically stubbing a cmd which is discovered by Path.
No description provided by the author
StubbingOngoing tells whether the current process is run as stub instead of an actual execution.
StubRequestDecoderFunc decodes an stubbing request from the given reader.
StubRequestEncoderFunc return an encoder which can write stubbing request representation into the writer.
ValueDuration returns the duration value if present or an error.
ValueUint8 returns the uint8 value if present or an error.
WriteStubRequestToNamedPipe write the stubbing request to the named pipe.

# Constants

DiscoveredByHomeBinDir specifies that the command is discovered using an home directory setting in environment.
DiscoveredByPath specifies that the command is discovered using environment path.
ExecTypeBash requires the use of a bash script for the stubbing.
ExecTypeExe requires the use of an Executable for the stubbing.
StubbingModeDyna reuqires dynamic stubbing.
StubbingModeStatic requires static stubbing.

# Structs

CmdConfig holds configuration data for an executable used for stubbing.
DiscoveredByHomeDirBinData holds data used to the home environment key and the binary sub-directory structure which contains the executable e.g.
ExecOutcome modells what happens when the stubbed command is executed.
Settings holds setting data for an exec stubbing.
StubRequest holds data send to a stubber through a ComChannel to request stubbing.
StubRequestDirRepo a repository to save and load stubbing requests from a directory.

# Interfaces

OptionalDuration is an time.Duration or nil to fake optional type for time.Duration.
OptionalUint8 is an uint8 or nil to fake optional type for unit8.

# Type aliases

DiscoveredBy specifies how executable is discovered.
ExecType specifies the type of exec used for stubbing.
StubbingMode specifies the stubing mode (static or dynamic).
StubFunc function use to produce the outcome for a stubbed command execution.