stacks

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BlockchainProviderStrings = []string{"geth", "besu", "fabric", "corda"}
View Source
var DBSelectionStrings = []string{"postgres", "sqlite3"}
View Source
var TokensProviderStrings = []string{"none", "erc1155"}

Functions

func CheckExists

func CheckExists(stackName string) (bool, error)

func GenerateKeyAndPeerId

func GenerateKeyAndPeerId() (privateKey string, peerId string)

func GenerateSwarmKey

func GenerateSwarmKey() string

func ListStacks

func ListStacks() ([]string, error)

Types

type BlockchainProvider

type BlockchainProvider int
const (
	GoEthereum BlockchainProvider = iota
	HyperledgerBesu
	HyperledgerFabric
	Corda
)

func BlockchainProviderFromString

func BlockchainProviderFromString(s string) (BlockchainProvider, error)

func (BlockchainProvider) String

func (blockchainProvider BlockchainProvider) String() string

type DataExchangeListenerConfig

type DataExchangeListenerConfig struct {
	Hostname string `json:"hostname,omitempty"`
	Endpoint string `json:"endpoint,omitempty"`
	Port     int    `json:"port,omitempty"`
}

type DataExchangePeerConfig

type DataExchangePeerConfig struct {
	API   *DataExchangeListenerConfig `json:"api,omitempty"`
	P2P   *DataExchangeListenerConfig `json:"p2p,omitempty"`
	Peers []*PeerConfig               `json:"peers"`
}

type DatabaseSelection

type DatabaseSelection int
const (
	PostgreSQL DatabaseSelection = iota
	SQLite3
)

func DatabaseSelectionFromString

func DatabaseSelectionFromString(s string) (DatabaseSelection, error)

func (DatabaseSelection) String

func (db DatabaseSelection) String() string

type InitOptions

type InitOptions struct {
	FireFlyBasePort    int
	ServicesBasePort   int
	DatabaseSelection  DatabaseSelection
	Verbose            bool
	ExternalProcesses  int
	OrgNames           []string
	NodeNames          []string
	BlockchainProvider BlockchainProvider
	TokensProvider     TokensProvider
	FireFlyVersion     string
	ManifestPath       string
}

type PeerConfig

type PeerConfig struct {
	ID       string `json:"id,omitempty"`
	Endpoint string `json:"endpoint,omitempty"`
}

type PullOptions added in v0.0.35

type PullOptions struct {
	Retries int
}

type StackManager

type StackManager struct {
	Log   log.Logger
	Stack *types.Stack
	// contains filtered or unexported fields
}

func NewStackManager

func NewStackManager(logger log.Logger) *StackManager

func (*StackManager) GenerateDataExchangeHTTPSConfig

func (s *StackManager) GenerateDataExchangeHTTPSConfig(memberId string) *DataExchangePeerConfig

func (*StackManager) InitStack

func (s *StackManager) InitStack(stackName string, memberCount int, options *InitOptions) (err error)

func (*StackManager) LoadStack

func (s *StackManager) LoadStack(stackName string, verbose bool) error

func (*StackManager) PrintStackInfo

func (s *StackManager) PrintStackInfo(verbose bool) error

func (*StackManager) PullStack added in v0.0.35

func (s *StackManager) PullStack(verbose bool, options *PullOptions) error

func (*StackManager) RemoveStack

func (s *StackManager) RemoveStack(verbose bool) error

func (*StackManager) ResetStack

func (s *StackManager) ResetStack(verbose bool) error

func (*StackManager) StackHasRunBefore

func (s *StackManager) StackHasRunBefore() (bool, error)

func (*StackManager) StartStack

func (s *StackManager) StartStack(verbose bool, options *StartOptions) error

func (*StackManager) StopStack

func (s *StackManager) StopStack(verbose bool) error

func (*StackManager) UpgradeStack

func (s *StackManager) UpgradeStack(verbose bool) error

type StartOptions

type StartOptions struct {
	NoRollback bool
}

type TokensProvider

type TokensProvider int
const (
	NilTokens TokensProvider = iota
	ERC1155
)

func TokensProviderFromString

func TokensProviderFromString(s string) (TokensProvider, error)

func (TokensProvider) String

func (tokensProvider TokensProvider) String() string

Jump to

Keyboard shortcuts

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