yamlconfig

package
v0.0.0-...-5a6e01e Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package yamlconfig defines yaml configs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blockdata

type Blockdata struct {
	Path *string
}

type Database

type Database struct {
	URI   *string `yaml:",omitempty"`
	Cache *string `yaml:",omitempty"`
}

func (Database) Set

func (no Database) Set(ctx context.Context) (context.Context, error)

type LocalConfig

type LocalConfig struct {
	SyncInterval *string `yaml:"sync-interval"`
	TimeServer   *string `yaml:"time-server,omitempty"`
}

func (LocalConfig) Set

type LocalNetwork

type LocalNetwork struct {
	Bind        *string                `yaml:"bind"`
	URL         *string                `yaml:"url"`
	CertKeyFile *string                `yaml:"cert-key,omitempty"`
	CertFile    *string                `yaml:"cert,omitempty"`
	Cache       *string                `yaml:",omitempty"`
	SealCache   *string                `yaml:"seal-cache,omitempty"`
	RateLimit   *RateLimit             `yaml:"rate-limit,omitempty"`
	Extras      map[string]interface{} `yaml:",inline"`
}

func (LocalNetwork) Set

type LocalNode

type LocalNode struct {
	Node              `yaml:",inline"`
	NetworkID         *string                  `yaml:"network-id,omitempty"`
	Privatekey        *string                  `yaml:",omitempty"`
	Network           *LocalNetwork            `yaml:",omitempty"`
	Storage           *Storage                 `yaml:",omitempty"`
	Nodes             []*RemoteNode            `yaml:",omitempty"`
	Suffrage          map[string]interface{}   `yaml:"suffrage,omitempty"`
	ProposalProcessor map[string]interface{}   `yaml:"proposal-processor,omitempty"`
	Policy            *Policy                  `yaml:",omitempty"`
	GenesisOperations []map[string]interface{} `yaml:"genesis-operations,omitempty"`
	LocalConfig       *LocalConfig             `yaml:",inline"`
	Extras            map[string]interface{}   `yaml:",inline"`
}

func (LocalNode) Set

func (no LocalNode) Set(ctx context.Context) (context.Context, error)

type Node

type Node struct {
	Address *string `yaml:",omitempty"`
}

type NodeNetwork

type NodeNetwork struct {
	Extras map[string]interface{} `yaml:",inline"`
}

type Policy

type Policy struct {
	ThresholdRatio                   *float64               `yaml:"threshold,omitempty"`
	MaxOperationsInSeal              *uint                  `yaml:"max-operations-in-seal"`
	MaxOperationsInProposal          *uint                  `yaml:"max-operations-in-proposal"`
	TimeoutWaitingProposal           *string                `yaml:"timeout-waiting-proposal,omitempty"`
	IntervalBroadcastingINITBallot   *string                `yaml:"interval-broadcasting-init-ballot,omitempty"`
	IntervalBroadcastingProposal     *string                `yaml:"interval-broadcasting-proposal,omitempty"`
	WaitBroadcastingACCEPTBallot     *string                `yaml:"wait-broadcasting-accept-ballot,omitempty"`
	IntervalBroadcastingACCEPTBallot *string                `yaml:"interval-broadcasting-accept-ballot,omitempty"`
	TimespanValidBallot              *string                `yaml:"timespan-valid-ballot,omitempty"`
	NetworkConnectionTimeout         *string                `yaml:"network-connection-timeout,omitempty"`
	Extras                           map[string]interface{} `yaml:",inline"`
}

func (Policy) Set

func (no Policy) Set(ctx context.Context) (context.Context, error)

type RateLimit

type RateLimit struct {
	// contains filtered or unexported fields
}

func (RateLimit) MarshalYAML

func (no RateLimit) MarshalYAML() (interface{}, error)

func (RateLimit) Set

func (no RateLimit) Set(ctx context.Context) (context.Context, error)

func (*RateLimit) UnmarshalYAML

func (no *RateLimit) UnmarshalYAML(value *yaml.Node) error

type RateLimitRate

type RateLimitRate limiter.Rate

func (RateLimitRate) MarshalYAML

func (no RateLimitRate) MarshalYAML() (interface{}, error)

func (*RateLimitRate) UnmarshalYAML

func (no *RateLimitRate) UnmarshalYAML(value *yaml.Node) error

type RateLimitRateRuleSet

type RateLimitRateRuleSet map[string]RateLimitRate

type RateLimitTargetRule

type RateLimitTargetRule struct {
	// contains filtered or unexported fields
}

func (*RateLimitTargetRule) UnmarshalYAML

func (no *RateLimitTargetRule) UnmarshalYAML(value *yaml.Node) error

type RemoteNode

type RemoteNode struct {
	Node        `yaml:",inline"`
	Publickey   *string                `yaml:",omitempty"`
	URL         *string                `yaml:"url,omitempty"`
	TLSInsecure *bool                  `yaml:"tls-insecure,omitempty"`
	Extras      map[string]interface{} `yaml:",inline"`
}

func (RemoteNode) Load

func (no RemoteNode) Load(ctx context.Context) (config.RemoteNode, error)

type Storage

type Storage struct {
	Database  *Database  `yaml:"database,omitempty"`
	Blockdata *Blockdata `yaml:"blockdata,omitempty"`
}

func (Storage) Set

func (no Storage) Set(ctx context.Context) (context.Context, error)

Jump to

Keyboard shortcuts

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