clients

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AllClients = map[string]ClientBinaryDependency{
				// contains filtered or unexported fields
	}

	ClientVersions = map[string]string{
					// contains filtered or unexported fields
	}
)
View Source
var Erigon = NewErigonClient()
View Source
var Geth = NewGethClient()
View Source
var Lighthouse = NewLighthouseClient()
View Source
var LighthouseValidator = NewLighthouseValidatorClient()
View Source
var Prysm = NewPrysmClient()
View Source
var PrysmValidator = NewPrysmValidatorClient()
View Source
var Teku = NewTekuClient()
View Source
var TekuValidator = NewTekuValidatorClient()

Functions

func IsAnyRunning

func IsAnyRunning() bool

Types

type ClientBinaryDependency

type ClientBinaryDependency interface {
	// Start starts the client with given flags
	Start(ctx *cli.Context, arguments []string) error

	// Stop stops the client
	Stop() error

	// Logs takes the latest log file and prints it to terminal, in live mode
	Logs(logsDirPath string) error

	// Reset deletes data directories of all clients
	Reset(datadir string) error

	// Install installs the client with given version
	Install(url string, isUpdate bool) error

	// Update updates client to specific version - TODO
	Update() error

	// IsRunning determines whether the client is already running
	IsRunning() bool

	// ParseUserFlags is used to trim any client prefix from flag
	ParseUserFlags(ctx *cli.Context) []string

	// PrepareStartFlags parses arguments that are later supplied to Start
	PrepareStartFlags(ctx *cli.Context) ([]string, error)

	// Name is a user-readable name utility, f.e. in logs etc.
	// Should be uppercase and match CommandName (non-case-sensitively)
	Name() string

	// CommandName identifies client in all sorts of technical aspects - commands, files etc.
	// Should be lowercase and match Name (non-case-sensitively)
	CommandName() string

	// ParseUrl replaces any missing information in install link with matching system info
	ParseUrl(tag, commitHash string) string

	// FilePath returns path to installed binary
	FilePath() string

	// Peers prints to console how many peers does the client have
	Peers(ctx *cli.Context) (outbound int, inbound int, err error)
}

type ErigonClient

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

func NewErigonClient

func NewErigonClient() *ErigonClient

func (ErigonClient) CommandName

func (client ErigonClient) CommandName() string

func (ErigonClient) FilePath

func (client ErigonClient) FilePath() string

func (ErigonClient) Install

func (client ErigonClient) Install(url string, isUpdate bool) (err error)

func (ErigonClient) IsRunning

func (client ErigonClient) IsRunning() bool

func (ErigonClient) Logs

func (client ErigonClient) Logs(logFilePath string) (err error)

func (ErigonClient) Name

func (client ErigonClient) Name() string

func (ErigonClient) ParseUrl

func (client ErigonClient) ParseUrl(tag, commitHash string) (url string)

func (ErigonClient) ParseUserFlags

func (client ErigonClient) ParseUserFlags(ctx *cli.Context) (startFlags []string)

func (*ErigonClient) Peers added in v0.12.0

func (e *ErigonClient) Peers(ctx *cli.Context) (outbound, inbound int, err error)

func (*ErigonClient) PrepareStartFlags

func (e *ErigonClient) PrepareStartFlags(ctx *cli.Context) (startFlags []string, err error)

func (ErigonClient) Reset

func (client ErigonClient) Reset(dataDirPath string) (err error)

func (ErigonClient) Start

func (client ErigonClient) Start(ctx *cli.Context, arguments []string) (err error)

func (ErigonClient) Stop

func (client ErigonClient) Stop() (err error)

func (ErigonClient) Update

func (client ErigonClient) Update() (err error)

type GethClient

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

func NewGethClient

func NewGethClient() *GethClient

func (GethClient) CommandName

func (client GethClient) CommandName() string

func (GethClient) FilePath

func (client GethClient) FilePath() string

func (GethClient) Install

func (client GethClient) Install(url string, isUpdate bool) (err error)

func (GethClient) IsRunning

func (client GethClient) IsRunning() bool

func (GethClient) Logs

func (client GethClient) Logs(logFilePath string) (err error)

func (GethClient) Name

func (client GethClient) Name() string

func (*GethClient) ParseUrl

func (g *GethClient) ParseUrl(tag, commitHash string) (url string)

func (GethClient) ParseUserFlags

func (client GethClient) ParseUserFlags(ctx *cli.Context) (startFlags []string)

func (*GethClient) Peers added in v0.12.0

func (g *GethClient) Peers(ctx *cli.Context) (outbound, inbound int, err error)

func (*GethClient) PrepareStartFlags

func (g *GethClient) PrepareStartFlags(ctx *cli.Context) (startFlags []string, err error)

func (GethClient) Reset

func (client GethClient) Reset(dataDirPath string) (err error)

func (GethClient) Start

func (client GethClient) Start(ctx *cli.Context, arguments []string) (err error)

func (GethClient) Stop

func (client GethClient) Stop() (err error)

func (*GethClient) Update

func (g *GethClient) Update() (err error)

type LighthouseClient

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

func NewLighthouseClient

func NewLighthouseClient() *LighthouseClient

func (LighthouseClient) CommandName

func (client LighthouseClient) CommandName() string

func (LighthouseClient) FilePath

func (client LighthouseClient) FilePath() string

func (LighthouseClient) Install

func (client LighthouseClient) Install(url string, isUpdate bool) (err error)

func (LighthouseClient) IsRunning

func (client LighthouseClient) IsRunning() bool

func (LighthouseClient) Logs

func (client LighthouseClient) Logs(logFilePath string) (err error)

func (LighthouseClient) Name

func (client LighthouseClient) Name() string

func (*LighthouseClient) ParseUrl

func (l *LighthouseClient) ParseUrl(tag, commitHash string) (url string)

func (LighthouseClient) ParseUserFlags

func (client LighthouseClient) ParseUserFlags(ctx *cli.Context) (startFlags []string)

func (*LighthouseClient) Peers added in v0.12.0

func (l *LighthouseClient) Peers(ctx *cli.Context) (outbound, inbound int, err error)

func (*LighthouseClient) PrepareStartFlags

func (l *LighthouseClient) PrepareStartFlags(ctx *cli.Context) (startFlags []string, err error)

func (LighthouseClient) Reset

func (client LighthouseClient) Reset(dataDirPath string) (err error)

func (LighthouseClient) Start

func (client LighthouseClient) Start(ctx *cli.Context, arguments []string) (err error)

func (LighthouseClient) Stop

func (client LighthouseClient) Stop() (err error)

func (*LighthouseClient) Update

func (l *LighthouseClient) Update() (err error)

type LighthouseValidatorClient

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

func NewLighthouseValidatorClient

func NewLighthouseValidatorClient() *LighthouseValidatorClient

func (LighthouseValidatorClient) CommandName

func (client LighthouseValidatorClient) CommandName() string

func (*LighthouseValidatorClient) Exit added in v0.7.1

func (l *LighthouseValidatorClient) Exit(ctx *cli.Context) (err error)

func (LighthouseValidatorClient) FilePath

func (client LighthouseValidatorClient) FilePath() string

func (*LighthouseValidatorClient) Import

func (l *LighthouseValidatorClient) Import(ctx *cli.Context) (err error)

func (LighthouseValidatorClient) Install

func (client LighthouseValidatorClient) Install(url string, isUpdate bool) (err error)

func (LighthouseValidatorClient) IsRunning

func (client LighthouseValidatorClient) IsRunning() bool

func (*LighthouseValidatorClient) List

func (l *LighthouseValidatorClient) List(ctx *cli.Context) (err error)

func (LighthouseValidatorClient) Logs

func (client LighthouseValidatorClient) Logs(logFilePath string) (err error)

func (LighthouseValidatorClient) Name

func (client LighthouseValidatorClient) Name() string

func (LighthouseValidatorClient) ParseUrl

func (client LighthouseValidatorClient) ParseUrl(tag, commitHash string) (url string)

func (LighthouseValidatorClient) ParseUserFlags

func (client LighthouseValidatorClient) ParseUserFlags(ctx *cli.Context) (startFlags []string)

func (LighthouseValidatorClient) Peers added in v0.12.0

func (client LighthouseValidatorClient) Peers(ctx *cli.Context) (outbound, inbound int, err error)

func (*LighthouseValidatorClient) PrepareStartFlags

func (l *LighthouseValidatorClient) PrepareStartFlags(ctx *cli.Context) (startFlags []string, err error)

func (LighthouseValidatorClient) Reset

func (client LighthouseValidatorClient) Reset(dataDirPath string) (err error)

func (*LighthouseValidatorClient) Start

func (l *LighthouseValidatorClient) Start(ctx *cli.Context, args []string) (err error)

func (LighthouseValidatorClient) Stop

func (client LighthouseValidatorClient) Stop() (err error)

func (*LighthouseValidatorClient) Update

func (l *LighthouseValidatorClient) Update() error

type PrysmClient

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

func NewPrysmClient

func NewPrysmClient() *PrysmClient

func (PrysmClient) CommandName

func (client PrysmClient) CommandName() string

func (PrysmClient) FilePath

func (client PrysmClient) FilePath() string

func (PrysmClient) Install

func (client PrysmClient) Install(url string, isUpdate bool) (err error)

func (PrysmClient) IsRunning

func (client PrysmClient) IsRunning() bool

func (PrysmClient) Logs

func (client PrysmClient) Logs(logFilePath string) (err error)

func (PrysmClient) Name

func (client PrysmClient) Name() string

func (PrysmClient) ParseUrl

func (client PrysmClient) ParseUrl(tag, commitHash string) (url string)

func (PrysmClient) ParseUserFlags

func (client PrysmClient) ParseUserFlags(ctx *cli.Context) (startFlags []string)

func (*PrysmClient) Peers added in v0.12.0

func (p *PrysmClient) Peers(ctx *cli.Context) (outbound, inbound int, err error)

func (*PrysmClient) PrepareStartFlags

func (p *PrysmClient) PrepareStartFlags(ctx *cli.Context) (startFlags []string, err error)

func (PrysmClient) Reset

func (client PrysmClient) Reset(dataDirPath string) (err error)

func (PrysmClient) Start

func (client PrysmClient) Start(ctx *cli.Context, arguments []string) (err error)

func (PrysmClient) Stop

func (client PrysmClient) Stop() (err error)

func (PrysmClient) Update

func (client PrysmClient) Update() (err error)

type PrysmValidatorClient

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

func NewPrysmValidatorClient

func NewPrysmValidatorClient() *PrysmValidatorClient

func (PrysmValidatorClient) CommandName

func (client PrysmValidatorClient) CommandName() string

func (*PrysmValidatorClient) Exit added in v0.7.1

func (p *PrysmValidatorClient) Exit(ctx *cli.Context) (err error)

func (PrysmValidatorClient) FilePath

func (client PrysmValidatorClient) FilePath() string

func (*PrysmValidatorClient) Import

func (p *PrysmValidatorClient) Import(ctx *cli.Context) (err error)

func (PrysmValidatorClient) Install

func (client PrysmValidatorClient) Install(url string, isUpdate bool) (err error)

func (PrysmValidatorClient) IsRunning

func (client PrysmValidatorClient) IsRunning() bool

func (*PrysmValidatorClient) List

func (p *PrysmValidatorClient) List(ctx *cli.Context) (err error)

func (PrysmValidatorClient) Logs

func (client PrysmValidatorClient) Logs(logFilePath string) (err error)

func (PrysmValidatorClient) Name

func (client PrysmValidatorClient) Name() string

func (PrysmValidatorClient) ParseUrl

func (client PrysmValidatorClient) ParseUrl(tag, commitHash string) (url string)

func (PrysmValidatorClient) ParseUserFlags

func (client PrysmValidatorClient) ParseUserFlags(ctx *cli.Context) (startFlags []string)

func (PrysmValidatorClient) Peers added in v0.12.0

func (client PrysmValidatorClient) Peers(ctx *cli.Context) (outbound, inbound int, err error)

func (*PrysmValidatorClient) PrepareStartFlags

func (p *PrysmValidatorClient) PrepareStartFlags(ctx *cli.Context) (startFlags []string, err error)

func (PrysmValidatorClient) Reset

func (client PrysmValidatorClient) Reset(dataDirPath string) (err error)

func (PrysmValidatorClient) Start

func (client PrysmValidatorClient) Start(ctx *cli.Context, arguments []string) (err error)

func (PrysmValidatorClient) Stop

func (client PrysmValidatorClient) Stop() (err error)

func (PrysmValidatorClient) Update

func (client PrysmValidatorClient) Update() (err error)

type TekuClient added in v0.9.0

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

func NewTekuClient added in v0.9.0

func NewTekuClient() *TekuClient

func (TekuClient) CommandName added in v0.9.0

func (client TekuClient) CommandName() string

func (*TekuClient) FilePath added in v0.9.0

func (t *TekuClient) FilePath() string

func (*TekuClient) Install added in v0.9.0

func (t *TekuClient) Install(url string, isUpdate bool) (err error)

func (TekuClient) IsRunning added in v0.9.0

func (client TekuClient) IsRunning() bool

func (TekuClient) Logs added in v0.9.0

func (client TekuClient) Logs(logFilePath string) (err error)

func (TekuClient) Name added in v0.9.0

func (client TekuClient) Name() string

func (TekuClient) ParseUrl added in v0.9.0

func (client TekuClient) ParseUrl(tag, commitHash string) (url string)

func (TekuClient) ParseUserFlags added in v0.9.0

func (client TekuClient) ParseUserFlags(ctx *cli.Context) (startFlags []string)

func (*TekuClient) Peers added in v0.12.0

func (t *TekuClient) Peers(ctx *cli.Context) (outbound, inbound int, err error)

func (*TekuClient) PrepareStartFlags added in v0.9.0

func (t *TekuClient) PrepareStartFlags(ctx *cli.Context) (startFlags []string, err error)

func (TekuClient) Reset added in v0.9.0

func (client TekuClient) Reset(dataDirPath string) (err error)

func (*TekuClient) Start added in v0.9.0

func (t *TekuClient) Start(ctx *cli.Context, arguments []string) (err error)

func (TekuClient) Stop added in v0.9.0

func (client TekuClient) Stop() (err error)

func (TekuClient) Update added in v0.9.0

func (client TekuClient) Update() (err error)

type TekuValidatorClient added in v0.9.0

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

func NewTekuValidatorClient added in v0.9.0

func NewTekuValidatorClient() *TekuValidatorClient

func (TekuValidatorClient) CommandName added in v0.9.0

func (client TekuValidatorClient) CommandName() string

func (*TekuValidatorClient) Exit added in v0.9.0

func (t *TekuValidatorClient) Exit(ctx *cli.Context) (err error)

func (TekuValidatorClient) FilePath added in v0.9.0

func (client TekuValidatorClient) FilePath() string

func (*TekuValidatorClient) Import added in v0.9.0

func (t *TekuValidatorClient) Import(ctx *cli.Context) (err error)

func (TekuValidatorClient) Install added in v0.9.0

func (client TekuValidatorClient) Install(url string, isUpdate bool) (err error)

func (TekuValidatorClient) IsRunning added in v0.9.0

func (client TekuValidatorClient) IsRunning() bool

func (*TekuValidatorClient) List added in v0.9.0

func (t *TekuValidatorClient) List(ctx *cli.Context) (err error)

func (TekuValidatorClient) Logs added in v0.9.0

func (client TekuValidatorClient) Logs(logFilePath string) (err error)

func (TekuValidatorClient) Name added in v0.9.0

func (client TekuValidatorClient) Name() string

func (TekuValidatorClient) ParseUrl added in v0.9.0

func (client TekuValidatorClient) ParseUrl(tag, commitHash string) (url string)

func (TekuValidatorClient) ParseUserFlags added in v0.9.0

func (client TekuValidatorClient) ParseUserFlags(ctx *cli.Context) (startFlags []string)

func (TekuValidatorClient) Peers added in v0.12.0

func (client TekuValidatorClient) Peers(ctx *cli.Context) (outbound, inbound int, err error)

func (*TekuValidatorClient) PrepareStartFlags added in v0.9.0

func (t *TekuValidatorClient) PrepareStartFlags(ctx *cli.Context) (startFlags []string, err error)

func (TekuValidatorClient) Reset added in v0.9.0

func (client TekuValidatorClient) Reset(dataDirPath string) (err error)

func (*TekuValidatorClient) Start added in v0.9.0

func (t *TekuValidatorClient) Start(ctx *cli.Context, arguments []string) (err error)

func (TekuValidatorClient) Stop added in v0.9.0

func (client TekuValidatorClient) Stop() (err error)

func (TekuValidatorClient) Update added in v0.9.0

func (client TekuValidatorClient) Update() (err error)

type ValidatorBinaryDependency

type ValidatorBinaryDependency interface {
	ClientBinaryDependency
	Import(ctx *cli.Context) error
	List(ctx *cli.Context) error
	Exit(ctx *cli.Context) error
}

Jump to

Keyboard shortcuts

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