launcher

package
v0.0.0-...-21d70e9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotStarted = runtimeStatus(iota)
	Running
	Finished
)
View Source
const (
	StdIn  = Stream(0)
	StdOut = Stream(1)
	StdErr = Stream(2)
)

matching standard file descriptors

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockWaiterPatternActor

type BlockWaiterPatternActor interface {
	PatternActor
	Wait() // Blocks until the actor has finished its work
}

func NewBlockWaiterPatternActor

func NewBlockWaiterPatternActor(blocks int, verbose bool) BlockWaiterPatternActor

type CommandResult

type CommandResult struct {
	Stdout string
	Stderr string
	Err    error
}

type Network

type Network struct {
	Nodes         []*Node
	NetworkConfig *NetworkConfiguration
}

func LaunchNetwork

func LaunchNetwork(networkConfigDir string, executablePath string) (network *Network, err error)

type NetworkConfiguration

type NetworkConfiguration struct {
	NetworkId          string               `json:"network_id"`
	GenesisPath        string               `json:"genesis_path"`
	NodeConfigurations []*NodeConfiguration `json:"node_configurations"`
}

type Node

type Node struct {
	PocketServer PocketServer
	Address      string
	DataDir      string
	// contains filtered or unexported fields
}

type NodeConfiguration

type NodeConfiguration struct {
	PrivateKey string `json:"private_key"`
	ConfigPath string `json:"config_path"`
}

type PatternActor

type PatternActor interface {
	MaybeAct(string) // The action that the pattern actor may execute depending on the output being passed in
}

All PatternActors must implement this interface

type PatternActorPipeline

type PatternActorPipeline struct {
	// contains filtered or unexported fields
}

A series of PatternActors

func (PatternActorPipeline) Write

func (r PatternActorPipeline) Write(p []byte) (n int, err error)

type PocketClient

type PocketClient interface {
	RunCommand(...string) (*CommandResult, error)
}

func NewPocketClient

func NewPocketClient(executablePath string, verbose bool) PocketClient

type PocketServer

type PocketServer interface {
	Start(...string) error
	Kill() error
	RegisterPatternActor(patternActor PatternActor, stream Stream) error
}

func NewPocketServer

func NewPocketServer(executablePath string) PocketServer

type PrinterPatternActor

type PrinterPatternActor interface {
	PatternActor
}

func NewPrinterPatternActor

func NewPrinterPatternActor() PrinterPatternActor

type Stream

type Stream int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL