Documentation ¶
Index ¶
- type Manager
- func (m *Manager) BuildImage(name, version, dockerFile, contextDir string, args map[string]string) error
- func (m *Manager) Client() *docker.Client
- func (m *Manager) ContainerID() string
- func (m *Manager) CreateDepositProposalExec(chainID string) (string, error)
- func (m *Manager) CreateExec(cmd []string, containerID string) (string, error)
- func (m *Manager) CreateSubmitProposalExec(targetVersion, chainID string, upgradeHeight uint) (string, error)
- func (m *Manager) CreateVoteProposalExec(chainID string) (string, error)
- func (m *Manager) ExportState(targetDir string) error
- func (m *Manager) KillCurrentNode() error
- func (m *Manager) RemoveNetwork() error
- func (m *Manager) RetrieveUpgradesList() ([]string, error)
- func (m *Manager) RunExec(ctx context.Context, exec string) (outBuf bytes.Buffer, errBuf bytes.Buffer, err error)
- func (m *Manager) RunNode(node *Node) error
- func (m *Manager) WaitForHeight(ctx context.Context, height int) error
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct { CurrentNode *dockertest.Resource // contains filtered or unexported fields }
Manager defines a docker pool instance, used to run and interact with evmos node containers. It enables run, query, execute cli commands and purge.
func NewManager ¶
NewManager creates new docker pool and network returns Manager instance
func (*Manager) BuildImage ¶
func (m *Manager) BuildImage(name, version, dockerFile, contextDir string, args map[string]string) error
BuildImage build docker image by provided path with <name>:<version> as name target
func (*Manager) ContainerID ¶
ContainerID returns current running container ID
func (*Manager) CreateDepositProposalExec ¶
CreateDepositProposalExec creates a gov tx to deposit for the current upgrade proposal
func (*Manager) CreateExec ¶
CreateExec creates docker exec command for specified container
func (*Manager) CreateSubmitProposalExec ¶
func (m *Manager) CreateSubmitProposalExec(targetVersion, chainID string, upgradeHeight uint) (string, error)
CreateSubmitProposalExec creates a gov tx to submit an upgrade proposal to the chain
func (*Manager) CreateVoteProposalExec ¶
CreateVoteProposalExec creates gov tx to vote 'yes' on the current upgrade proposal
func (*Manager) ExportState ¶
ExportState executes the 'docker cp' command to copy container .evmosd dir to the specified target dir (local)
See https://docs.docker.com/engine/reference/commandline/cp/
func (*Manager) KillCurrentNode ¶
func (*Manager) RemoveNetwork ¶
func (*Manager) RetrieveUpgradesList ¶
RetrieveUpgradeVersion parses app/upgrades folder and returns slice of semver upgrade versions ascending order, e.g ["v1.0.0", "v1.0.1", "v1.1.0", ... , "v10.0.0"]
func (*Manager) RunExec ¶
func (m *Manager) RunExec(ctx context.Context, exec string) (outBuf bytes.Buffer, errBuf bytes.Buffer, err error)
RunExec runs the provided docker exec call
type Node ¶
type Node struct { RunOptions *dockertest.RunOptions // contains filtered or unexported fields }
Node defines evmos node params for running container of specific version with custom docker run arguments
func (*Node) Mount ¶
Mount sets the container mount point, which is used as the value for 'docker run --volume'
See https://docs.docker.com/engine/reference/builder/#volume
func (*Node) SetCmd ¶
SetCmd sets the container entry command and overrides the image CMD instruction
func (*Node) SetEnvVars ¶
SetEnvVars allows to set addition container environment variables in format []string{ "VAR_NAME=valaue" }
func (*Node) UseRunOptions ¶
func (n *Node) UseRunOptions()
UseRunOptions sets a flag to allow the node Manager to run the container with additional run options