Documentation ¶
Index ¶
- func AddressSendCoins(ctx context.Context, cli *client.Client, ...) (txId string, err error)
- func CheckPeerExists(ctx context.Context, cli *client.Client, ...) (bool, error)
- func CloseChannel(ctx context.Context, cli *client.Client, ...) (closeTxId string, err error)
- func ConnectPeer(ctx context.Context, cli *client.Client, ...) error
- func CreateChannel(ctx context.Context, cli *client.Client, ...) (channelPoint string, err error)
- func CreateNewVirtualNetwork(name string, createDatabase bool, purge bool) error
- func ExecCommand(ctx context.Context, cli *client.Client, ...) (bufStdout bytes.Buffer, bufStderr bytes.Buffer, err error)
- func ExecJSONReturningCommand(ctx context.Context, cli *client.Client, ...) error
- func GenerateInvoice(ctx context.Context, cli *client.Client, ...) (encodedInvoice string, err error)
- func GetChannelBalance(ctx context.Context, cli *client.Client, ...) (balance string, err error)
- func GetNewAddress(ctx context.Context, cli *client.Client, ...) (addr string, err error)
- func GetOnchainBalance(ctx context.Context, cli *client.Client, ...) (balance string, err error)
- func GetPubKey(ctx context.Context, cli *client.Client, ...) (pubkey string, err error)
- func ListNodeChannels(ctx context.Context, cli *client.Client, ...) (channels []string, err error)
- func MineBlocks(ctx context.Context, cli *client.Client, ...) error
- func NodeFLowLoop(name string, invfrq int, scofrq int, ochfrq int) error
- func PayInvoice(ctx context.Context, cli *client.Client, ...) 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, ...) 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 AddressSendCoins(ctx context.Context, cli *client.Client, container dockercontainer.ContainerCreateCreatedBody, address string, amt string) (txId string, err error)
func CheckPeerExists ¶
func CheckPeerExists(ctx context.Context, cli *client.Client, container dockercontainer.ContainerCreateCreatedBody, remotePubkey string) (bool, error)
func CloseChannel ¶
func CloseChannel(ctx context.Context, cli *client.Client, container dockercontainer.ContainerCreateCreatedBody, channelPoint string) (closeTxId string, err error)
func ConnectPeer ¶
func ConnectPeer(ctx context.Context, cli *client.Client, container dockercontainer.ContainerCreateCreatedBody, remotePubkey string, remoteIPAddress string) error
func CreateChannel ¶
func CreateChannel(ctx context.Context, cli *client.Client, container dockercontainer.ContainerCreateCreatedBody, remotePubkey string, amount string, btcd dockercontainer.ContainerCreateCreatedBody) (channelPoint string, err error)
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 ExecJSONReturningCommand ¶
func ExecJSONReturningCommand(ctx context.Context, cli *client.Client, container dockercontainer.ContainerCreateCreatedBody, cmd []string, returnObject interface{}) error
func GenerateInvoice ¶
func GenerateInvoice(ctx context.Context, cli *client.Client, container dockercontainer.ContainerCreateCreatedBody, amount string) (encodedInvoice string, err error)
func GetChannelBalance ¶
func GetChannelBalance(ctx context.Context, cli *client.Client, container dockercontainer.ContainerCreateCreatedBody) (balance string, err error)
func GetNewAddress ¶
func GetNewAddress(ctx context.Context, cli *client.Client, instance dockercontainer.ContainerCreateCreatedBody) (addr string, err error)
func GetOnchainBalance ¶
func GetOnchainBalance(ctx context.Context, cli *client.Client, container dockercontainer.ContainerCreateCreatedBody) (balance string, err error)
func GetPubKey ¶
func GetPubKey(ctx context.Context, cli *client.Client, container dockercontainer.ContainerCreateCreatedBody) (pubkey string, err error)
func ListNodeChannels ¶ added in v0.8.15
func ListNodeChannels(ctx context.Context, cli *client.Client, container dockercontainer.ContainerCreateCreatedBody, pubkey string) (channels []string, err error)
func MineBlocks ¶
func MineBlocks(ctx context.Context, cli *client.Client, container dockercontainer.ContainerCreateCreatedBody, numberOfBlocks int) error
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 PayInvoice(ctx context.Context, cli *client.Client, container dockercontainer.ContainerCreateCreatedBody, invoice string) error
func PrintInstructions ¶
func PrintInstructions(carolPublicKey, carolIpAddress, bobPublicKey, bobIpAddress, alicePublicKey, aliceIpAddress string)
func PurgeVirtualNetwork ¶
func SegWitActive ¶
func SegWitActive(ctx context.Context, cli *client.Client, container dockercontainer.ContainerCreateCreatedBody) error
func StartVirtualNetwork ¶
func StopVirtualNetwork ¶
Types ¶
type ContainerConfig ¶
type ContainerConfig struct { Name string Image string Env []string Binds []string Cmd []string MappedPort string Instance dockercontainer.ContainerCreateCreatedBody }
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) *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"` }