stacks

package
v1.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 34 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)

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 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(ctx context.Context) *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) error

func (*StackManager) PrintStackInfo

func (s *StackManager) PrintStackInfo() error

func (*StackManager) PullStack added in v0.0.35

func (s *StackManager) PullStack(options *types.PullOptions) error

func (*StackManager) RemoveStack

func (s *StackManager) RemoveStack() error

func (*StackManager) ResetStack

func (s *StackManager) ResetStack() error

func (*StackManager) StartStack

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

func (*StackManager) StopStack

func (s *StackManager) StopStack() error

func (*StackManager) UpgradeStack

func (s *StackManager) UpgradeStack() 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