Documentation ¶
Index ¶
- func AddressSendCoins(ctx context.Context, cli *client.Client, containerId string, address string, ...) (txId string, err error)
- func CheckPeerExists(ctx context.Context, cli *client.Client, containerId string, ...) (bool, error)
- func CloseChannel(ctx context.Context, cli *client.Client, containerId string, ...) (closeTxId string, err error)
- func ConnectPeer(ctx context.Context, cli *client.Client, containerId string, ...) error
- func CreateChannel(ctx context.Context, cli *client.Client, containerId string, ...) (channelPoint string, err error)
- func CreateNewVirtualNetwork(name string, createDatabase bool, purge bool) error
- func ExecCommand(ctx context.Context, cli *client.Client, containerId string, cmd []string) (bufStdout bytes.Buffer, bufStderr bytes.Buffer, err error)
- func ExecJSONReturningCommand(ctx context.Context, cli *client.Client, containerId string, cmd []string, ...) error
- func GenerateInvoice(ctx context.Context, cli *client.Client, containerId string, amount string) (encodedInvoice string, err error)
- func GetChannelBalance(ctx context.Context, cli *client.Client, containerId string) (balance string, err error)
- func GetNewAddress(ctx context.Context, cli *client.Client, instanceId string) (addr string, err error)
- func GetOnchainBalance(ctx context.Context, cli *client.Client, containerId string) (balance string, err error)
- func GetPubKey(ctx context.Context, cli *client.Client, containerId string) (pubkey string, err error)
- func ListNodeChannels(ctx context.Context, cli *client.Client, containerId string, pubkey string) (channels []string, err error)
- func MineBlocks(ctx context.Context, cli *client.Client, containerId string, ...) error
- func NodeFLowLoop(name string, invfrq int, scofrq int, ochfrq int) error
- func PayInvoice(ctx context.Context, cli *client.Client, containerId string, invoice string, ...) error
- func PrintInstructions(...)
- func PurgeVirtualNetwork(name string, withDatabase bool) error
- func Retry(operation func() error, delayMilliseconds int, maxWaitMilliseconds int) error
- func SegWitActive(ctx context.Context, cli *client.Client, containerId string) error
- func StartVirtualNetwork(name string, withDatabase bool) error
- func StopVirtualNetwork(name string, withDatabase bool) error
- func WriteConnectionDetails(ctx context.Context, cli *client.Client, name string, nodeIp string) error
- type ContainerConfig
- type DockerDevEnvironment
- func (de *DockerDevEnvironment) AddContainer(name string, image string, binds []string, env []string, cmd []string, ...) *ContainerConfig
- func (de *DockerDevEnvironment) BuildImage(ctx context.Context, path string, name string) error
- func (de *DockerDevEnvironment) CleanupContainers(ctx context.Context) error
- func (de *DockerDevEnvironment) CleanupDefaultVolumes(ctx context.Context) error
- func (de *DockerDevEnvironment) CreateContainer(ctx context.Context, container *ContainerConfig) (err error)
- func (de *DockerDevEnvironment) CreateNetwork(ctx context.Context) (nc network.NetworkingConfig, err error)
- func (de *DockerDevEnvironment) FindAndRemoveContainer(ctx context.Context, name string) error
- func (de *DockerDevEnvironment) FindAndRemoveNetwork(ctx context.Context, name string) error
- func (de *DockerDevEnvironment) FindAndRemoveVolume(ctx context.Context, name string) error
- func (de *DockerDevEnvironment) FindContainerByName(ctx context.Context, name string) (*types.Container, error)
- func (de *DockerDevEnvironment) FindNetworkByName(ctx context.Context, name string) (*types.NetworkResource, error)
- func (de *DockerDevEnvironment) FindVolumeByName(ctx context.Context, name string) (*types.Volume, error)
- func (de *DockerDevEnvironment) InitContainer(ctx context.Context, container *ContainerConfig) error
- func (de *DockerDevEnvironment) StartContainer(ctx context.Context, cc *ContainerConfig) (err error)
- func (de *DockerDevEnvironment) StopContainer(ctx context.Context, name string) (err error)
- type ErrorDetail
- type ErrorLine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressSendCoins ¶ added in v0.8.15
func CheckPeerExists ¶
func CloseChannel ¶
func ConnectPeer ¶
func CreateChannel ¶
func CreateNewVirtualNetwork ¶
CreateNewVirtualNetwork creates a new virtual network with the given name, this is used for creating the development Lightning network and database.
func ExecCommand ¶
func GenerateInvoice ¶
func GetChannelBalance ¶
func GetNewAddress ¶
func GetOnchainBalance ¶
func ListNodeChannels ¶ added in v0.8.15
func MineBlocks ¶
func NodeFLowLoop ¶ added in v0.8.15
NodeFLowLoop Run a loop that - creates and pays invoices to/from random nodes at a user defined interval - creates addresses and sends coins from/to random nodes at a user defined interval - opens a channel between random nodes at user defined interval -no more than 2 duplicate channels - closes channels randomly invfrq flag = invoice creation frequency - default to 1 time per second sendcoins flag = create address and sencoins frequency - default to 1 time per 30 seconds openChan flag = open channel frequency - default to 1 time per 10 minutes
func PayInvoice ¶
func PrintInstructions ¶
func PrintInstructions(carolPublicKey, carolIpAddress, bobPublicKey, bobIpAddress, alicePublicKey, aliceIpAddress string)
func PurgeVirtualNetwork ¶
func SegWitActive ¶
func StartVirtualNetwork ¶
func StopVirtualNetwork ¶
Types ¶
type ContainerConfig ¶
type DockerDevEnvironment ¶
type DockerDevEnvironment struct { Client *client.Client NetworkName string NetworkingConfig network.NetworkingConfig Containers map[string]*ContainerConfig }
func (*DockerDevEnvironment) AddContainer ¶
func (de *DockerDevEnvironment) AddContainer(name string, image string, binds []string, env []string, cmd []string, mappedPort string, id string) *ContainerConfig
func (*DockerDevEnvironment) BuildImage ¶
func (*DockerDevEnvironment) CleanupContainers ¶
func (de *DockerDevEnvironment) CleanupContainers(ctx context.Context) error
func (*DockerDevEnvironment) CleanupDefaultVolumes ¶
func (de *DockerDevEnvironment) CleanupDefaultVolumes(ctx context.Context) error
func (*DockerDevEnvironment) CreateContainer ¶
func (de *DockerDevEnvironment) CreateContainer(ctx context.Context, container *ContainerConfig) (err error)
func (*DockerDevEnvironment) CreateNetwork ¶
func (de *DockerDevEnvironment) CreateNetwork(ctx context.Context) (nc network.NetworkingConfig, err error)
func (*DockerDevEnvironment) FindAndRemoveContainer ¶
func (de *DockerDevEnvironment) FindAndRemoveContainer(ctx context.Context, name string) error
func (*DockerDevEnvironment) FindAndRemoveNetwork ¶
func (de *DockerDevEnvironment) FindAndRemoveNetwork(ctx context.Context, name string) error
func (*DockerDevEnvironment) FindAndRemoveVolume ¶
func (de *DockerDevEnvironment) FindAndRemoveVolume(ctx context.Context, name string) error
func (*DockerDevEnvironment) FindContainerByName ¶
func (*DockerDevEnvironment) FindNetworkByName ¶
func (de *DockerDevEnvironment) FindNetworkByName(ctx context.Context, name string) (*types.NetworkResource, error)
func (*DockerDevEnvironment) FindVolumeByName ¶
func (*DockerDevEnvironment) InitContainer ¶
func (de *DockerDevEnvironment) InitContainer(ctx context.Context, container *ContainerConfig) error
func (*DockerDevEnvironment) StartContainer ¶
func (de *DockerDevEnvironment) StartContainer(ctx context.Context, cc *ContainerConfig) (err error)
func (*DockerDevEnvironment) StopContainer ¶
func (de *DockerDevEnvironment) StopContainer(ctx context.Context, name string) (err error)
type ErrorDetail ¶
type ErrorDetail struct {
Message string `json:"message"`
}
type ErrorLine ¶
type ErrorLine struct { Error string `json:"error"` ErrorDetail ErrorDetail `json:"errorDetail"` }