stacks

package
v0.0.44 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NilTokens    types.TokenProvider = "none"
	ERC1155      types.TokenProvider = "erc1155"
	ERC20_ERC721 types.TokenProvider = "erc20_erc721"
)

Variables

View Source
var BlockchainProviderStrings = []string{"geth", "besu", "fabric", "corda"}
View Source
var DBSelectionStrings = []string{"postgres", "sqlite3"}
View Source
var ValidTokenProviders = []types.TokenProvider{NilTokens, ERC1155, ERC20_ERC721}

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)

func TokenProvidersFromStrings added in v0.0.42

func TokenProvidersFromStrings(strTokens []string) (tps types.TokenProviders, err 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 GlobalConfig added in v0.0.40

type GlobalConfig struct {
	ScrapeInterval string `yaml:"scrape_interval,omitempty"`
	ScrapeTimeout  string `yaml:"scrape_timeout,omitempty"`
}

type InitOptions

type InitOptions struct {
	FireFlyBasePort    int
	ServicesBasePort   int
	DatabaseSelection  DatabaseSelection
	Verbose            bool
	ExternalProcesses  int
	OrgNames           []string
	NodeNames          []string
	BlockchainProvider BlockchainProvider
	TokenProviders     types.TokenProviders
	FireFlyVersion     string
	ManifestPath       string
	PrometheusEnabled  bool
	PrometheusPort     int
}

type PeerConfig

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

type PrometheusConfig added in v0.0.40

type PrometheusConfig struct {
	Global        *GlobalConfig   `yaml:"global,omitempty"`
	ScrapeConfigs []*ScrapeConfig `yaml:"scrape_configs,omitempty"`
}

type PullOptions added in v0.0.35

type PullOptions struct {
	Retries int
}

type ScrapeConfig added in v0.0.40

type ScrapeConfig struct {
	JobName       string          `yaml:"job_name,omitempty"`
	MetricsPath   string          `yaml:"metrics_path,omitempty"`
	StaticConfigs []*StaticConfig `yaml:"static_configs,omitempty"`
}

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) GeneratePrometheusConfig added in v0.0.40

func (s *StackManager) GeneratePrometheusConfig() *PrometheusConfig

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 StaticConfig added in v0.0.40

type StaticConfig struct {
	Targets []string `yaml:"targets,omitempty"`
}

Jump to

Keyboard shortcuts

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