group

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MinBalance                 uint64 = 31.95 * 1e9
	ExpectedStatuses                  = []string{"active_online", "active_offline"}
	WithdrawalCredentialsCodes        = []int64{1}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Name            string            `yaml:"name"`
	Address         string            `yaml:"address"`
	RecoveryAddress string            `yaml:"recoveryAddress"`
	Contract        *string           `yaml:"contract"`
	Accounts        []*account.Config `yaml:"accounts"`
	Controller      controller.Config `yaml:"controller"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Group

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

func NewGroup

func NewGroup(ctx context.Context, log logrus.FieldLogger, monitor string, conf *Config, ethereumPool *ethereum.Pool, publisher *notifier.Publisher, safeClient safe.Client) (*Group, error)

func (*Group) Start

func (g *Group) Start(ctx context.Context) error

func (*Group) Stop

func (g *Group) Stop(ctx context.Context) error

type Metrics

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

func GetMetricsInstance

func GetMetricsInstance(namespace, monitor string) *Metrics

func (Metrics) ClearController added in v0.1.1

func (m Metrics) ClearController(labels []string)

func (Metrics) ClearHashInitial added in v0.1.1

func (m Metrics) ClearHashInitial(labels []string)

func (Metrics) ClearHashRecovery added in v0.1.1

func (m Metrics) ClearHashRecovery(labels []string)

func (Metrics) ClearHashStable added in v0.1.1

func (m Metrics) ClearHashStable(labels []string)

func (Metrics) UpdateBalance

func (m Metrics) UpdateBalance(balance float64, labels []string)

func (Metrics) UpdateController

func (m Metrics) UpdateController(controller float64, labels []string)

func (Metrics) UpdateHashInitial added in v0.1.0

func (m Metrics) UpdateHashInitial(hash float64, labels []string)

func (Metrics) UpdateHashRecovery added in v0.1.0

func (m Metrics) UpdateHashRecovery(hash float64, labels []string)

func (Metrics) UpdateHashStable added in v0.1.0

func (m Metrics) UpdateHashStable(hash float64, labels []string)

type Split

type Split struct {
	Hash       string
	Controller string
}

type State

type State struct {
	Sources map[string]*Split
	// contains filtered or unexported fields
}

func NewState

func NewState(log logrus.FieldLogger) *State

func (*State) Merge

func (s *State) Merge(other *State) (changedSources []string)

func (*State) UpdateSplit

func (s *State) UpdateSplit(source, hash, controller string)

Directories

Path Synopsis
eoa

Jump to

Keyboard shortcuts

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