stacks

package
v1.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 WriteFFTMConfig added in v1.0.2

func WriteFFTMConfig(config *FFTMConfig, filePath string, extraCoreConfigPath string) error

Types

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 FFTMAPIConfig added in v1.0.2

type FFTMAPIConfig struct {
	Address string `yaml:"address,omitempty"`
	Port    int64  `yaml:"port,omitempty"`
}

type FFTMConfig added in v1.0.2

type FFTMConfig struct {
	Log           FFTMLogConfig           `yaml:"log"`
	API           FFTMAPIConfig           `yaml:"api"`
	Connector     FFTMConnectorConfig     `yaml:"connector"`
	FFCore        FFTMFFCoreConfig        `yaml:"ffcore"`
	Manager       FFTMManagerConfig       `yaml:"manager"`
	PolicyEngine  FFTMPolicyEngineConfig  `yaml:"policyengine"`
	Confirmations FFTMConfirmationsConfig `yaml:"confirmations"`
}

func NewFFTMConfig added in v1.0.2

func NewFFTMConfig(stack *types.Stack, member *types.Organization) *FFTMConfig

type FFTMConfirmationsConfig added in v1.0.2

type FFTMConfirmationsConfig struct {
	Required int64 `yaml:"required,omitempty"`
}

type FFTMConnectorConfig added in v1.0.2

type FFTMConnectorConfig struct {
	URL     string `yaml:"url,omitempty"`
	Variant string `yaml:"variant,omitempty"`
}

type FFTMFFCoreConfig added in v1.0.2

type FFTMFFCoreConfig struct {
	URL string `yaml:"url,omitempty"`
}

type FFTMLogConfig added in v1.0.2

type FFTMLogConfig struct {
	Level string `yaml:"level,omitempty"`
}

type FFTMManagerConfig added in v1.0.2

type FFTMManagerConfig struct {
	Name string `yaml:"name,omitempty"`
}

type FFTMPolicyEngineConfig added in v1.0.2

type FFTMPolicyEngineConfig struct {
	Name   string                       `yaml:"name,omitempty"`
	Simple FFTMSimplePolicyEngineConfig `yaml:"simple,omitempty"`
}

type FFTMSimplePolicyEngineConfig added in v1.0.2

type FFTMSimplePolicyEngineConfig struct {
	FixedGasPrice string                                `yaml:"fixedGasPrice,omitempty"`
	GasOracle     FFTMSimplePolicyEngineGasOracleConfig `yaml:"gasOracle,omitempty"`
}

type FFTMSimplePolicyEngineGasOracleConfig added in v1.0.2

type FFTMSimplePolicyEngineGasOracleConfig struct {
	Mode string `yaml:"mode,omitempty"`
}

type GlobalConfig added in v0.0.40

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

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 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

	IsOldFileStructure bool
	// contains filtered or unexported fields
}

func NewStackManager

func NewStackManager(logger log.Logger) *StackManager

func (*StackManager) CreateAccount added in v0.0.47

func (s *StackManager) CreateAccount(args []string) (string, error)

func (*StackManager) DeployContract added in v0.0.45

func (s *StackManager) DeployContract(filename, contractName string, memberIndex int, extraArgs []string) (string, error)

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) GetContracts added in v0.0.45

func (s *StackManager) GetContracts(filename string, extraArgs []string) ([]string, error)

func (*StackManager) InitStack

func (s *StackManager) InitStack(stackName string, memberCount int, options *types.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 *types.PullOptions) error

func (*StackManager) RemoveStack

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

func (*StackManager) ResetStack

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

func (*StackManager) StartStack

func (s *StackManager) StartStack(verbose bool, options *types.StartOptions) (messages []string, err error)

func (*StackManager) StopStack

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

func (*StackManager) UpgradeStack

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

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