service

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

service package provides various templates to build a docker-compose.yml

Source Files

Each file contains following contents

  • constellation.go : Deprecated. This is not being used in Kaia
  • eth_stats.go : Defines `KaiaStats` and provides a yaml template for a KaiaStats service
  • grafana.go : Defines `GrafanaService` and provides a yaml template for a Grafana service
  • prometheus.go : Defines `PrometheusService` and provides a yaml template for a Prometheus service
  • txgen.go : Defines `TxGenService` and provides a yaml template for a txgen service
  • validator.go : Defines `Validator` and provides a yaml template for a validator configuration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constellation

type Constellation struct {
	Identity   int
	Name       string
	IP         string
	Port       int
	OtherNodes string
	PublicKey  string
	PrivateKey string
	SocketPath string
	ConfigPath string
	Folder     string
	KeyPath    string
}

func (Constellation) Host

func (c Constellation) Host() string

func (*Constellation) SetOtherNodes

func (c *Constellation) SetOtherNodes(nodes []string)

func (Constellation) String

func (c Constellation) String() string

type GrafanaService

type GrafanaService struct {
	IP string
}

func NewGrafanaService

func NewGrafanaService(ip string) *GrafanaService

func (GrafanaService) String

func (gf GrafanaService) String() string

type KaiaStats

type KaiaStats struct {
	Secret string
	IP     string
}

func NewEthStats

func NewEthStats(ip string, secret string) *KaiaStats

func (KaiaStats) Host

func (c KaiaStats) Host() string

func (KaiaStats) String

func (c KaiaStats) String() string

type PrometheusConfig

type PrometheusConfig struct {
	Targets []string
}

prometheus server config

func NewPrometheusConfig

func NewPrometheusConfig(targetHostNames []string) PrometheusConfig

func (PrometheusConfig) String

func (promConfig PrometheusConfig) String() string

type PrometheusService

type PrometheusService struct {
	Config PrometheusConfig
	Name   string
	IP     string
}

docker-compose service

func NewPrometheusService

func NewPrometheusService(ip string, targetHostNames []string) *PrometheusService

func (PrometheusService) String

func (prom PrometheusService) String() string

type TxGenOption

type TxGenOption struct {
	TxGenThreadSize int
	TxGenDuration   string
	TxGenConnSize   int
	TxGenRate       int
}

type TxGenService

type TxGenService struct {
	Name       string
	IP         string
	TargetUrl  string
	Rate       int
	ThreadSize int
	ConnSize   int
	Duration   string
}

func NewTxGenService

func NewTxGenService(ip string, targetUrl string, opt TxGenOption) *TxGenService

func (TxGenService) String

func (s TxGenService) String() string

type Validator

type Validator struct {
	Identity       int
	Genesis        string
	SCGenesis      string
	Address        string
	NodeKey        string
	StaticNodes    string
	BridgeNodes    string
	Port           int
	RPCPort        int
	PrometheusPort int
	IP             string
	EthStats       string
	Name           string
	DockerImageId  string
	UseFastHttp    bool
	NetworkId      int
	ParentChainId  int
	NodeType       string
	AddPrivKey     bool
}

func NewValidator

func NewValidator(identity int, genesis, scGenesis string, nodeAddress string, nodeKey string, staticNodes, bridgeNodes string, port int, rpcPort int,
	prometheusPort int, ethStats string, ip string, dockerImageId string, useFastHttp bool, networkId, parentChainId int,
	namePrefix string, nodeType string, addPrivKey bool,
) *Validator

func (Validator) String

func (v Validator) String() string

Jump to

Keyboard shortcuts

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