Documentation
¶
Index ¶
- Variables
- type OpenBazaarRunner
- func (r *OpenBazaarRunner) AsyncStart() *OpenBazaarRunner
- func (r *OpenBazaarRunner) BeginNodeStateTransaction() error
- func (r *OpenBazaarRunner) Cleanup() error
- func (r *OpenBazaarRunner) ExitCodeAndErr() (int, error)
- func (r *OpenBazaarRunner) Init() *OpenBazaarRunner
- func (r *OpenBazaarRunner) Kill() error
- func (r *OpenBazaarRunner) RunStart() *OpenBazaarRunner
- func (r *OpenBazaarRunner) SetConfigValue(path string, value interface{}) error
- func (r *OpenBazaarRunner) SetCustomDataPath(path string) error
- func (r *OpenBazaarRunner) SetTestnetMode(enabled bool) error
- func (r *OpenBazaarRunner) SplitOutput() io.ReadCloser
- func (r *OpenBazaarRunner) Version() (string, error)
- func (r *OpenBazaarRunner) WithArgs(args []string) *OpenBazaarRunner
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type OpenBazaarRunner ¶
type OpenBazaarRunner struct {
// contains filtered or unexported fields
}
OpenBazaarRunner is reponsible for the runtime operations of the openbazaar-go binary
func FromBinaryPath ¶
func FromBinaryPath(path string) (*OpenBazaarRunner, error)
FromBinaryPath will return an OpenBazaarRunner which uses the binary located at the path provided.
func (*OpenBazaarRunner) AsyncStart ¶
func (r *OpenBazaarRunner) AsyncStart() *OpenBazaarRunner
AsyncStart will return immediately to allow other tasks to continue while running.
func (*OpenBazaarRunner) BeginNodeStateTransaction ¶
func (r *OpenBazaarRunner) BeginNodeStateTransaction() error
func (*OpenBazaarRunner) Cleanup ¶
func (r *OpenBazaarRunner) Cleanup() error
Cleanup ensures all resources which require cleaning are given an opportunity. It is the responsibility of the consumer to ensure Cleanup is called when the runner is no longer used.
func (*OpenBazaarRunner) ExitCodeAndErr ¶
func (r *OpenBazaarRunner) ExitCodeAndErr() (int, error)
ExitCodeAndErr returns the exit code and error state of the executed binary
func (*OpenBazaarRunner) Init ¶
func (r *OpenBazaarRunner) Init() *OpenBazaarRunner
Init will synchronously initialize the node
func (*OpenBazaarRunner) Kill ¶
func (r *OpenBazaarRunner) Kill() error
Kill will ensure the binary process is stopped
func (*OpenBazaarRunner) RunStart ¶
func (r *OpenBazaarRunner) RunStart() *OpenBazaarRunner
RunStart will run synchronously and will return when the process finishes running.
func (*OpenBazaarRunner) SetConfigValue ¶
func (r *OpenBazaarRunner) SetConfigValue(path string, value interface{}) error
SetConfigValue will follow a dot-separated string pointing to the nested config key to change, and change it to the provided string value
func (*OpenBazaarRunner) SetCustomDataPath ¶
func (r *OpenBazaarRunner) SetCustomDataPath(path string) error
SetCustomDataPath will ensure the running binary starts using the state data found at the path provided.
func (*OpenBazaarRunner) SetTestnetMode ¶
func (r *OpenBazaarRunner) SetTestnetMode(enabled bool) error
SetTestnetMode will ensure the running binary starts using the testnet flag
func (*OpenBazaarRunner) SplitOutput ¶
func (r *OpenBazaarRunner) SplitOutput() io.ReadCloser
SplitOutput returns a io.ReadCloser which has the stdout and stderr streams being sent to its in-memory pipe buffer immediately after being started.
func (*OpenBazaarRunner) Version ¶
func (r *OpenBazaarRunner) Version() (string, error)
Version returns the version of the running binary
func (*OpenBazaarRunner) WithArgs ¶
func (r *OpenBazaarRunner) WithArgs(args []string) *OpenBazaarRunner
WithArgs adds additional arguments for the running binary to recieve