admin

package
v0.73.14 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client implement a socket client allowing to run simple RPC commands.

func NewClient

func NewClient(
	log *logging.Logger,
	config Config,
) *Client

NewClient returns a new instance of the RPC socket client.

func (*Client) NodeWalletReload

func (s *Client) NodeWalletReload(ctx context.Context, chain string) (*NodeWalletReloadReply, error)

func (*Client) NodeWalletShow

func (s *Client) NodeWalletShow(ctx context.Context, chain string) (*Wallet, error)

func (*Client) UpgradeStatus

func (s *Client) UpgradeStatus(ctx context.Context) (*types.UpgradeStatus, error)

type Config

type Config struct {
	Level  encoding.LogLevel `long:"log-level"`
	Server ServerConfig      `group:"Server"   namespace:"server"`
}

Config represents the configuration of the admin package.

func NewDefaultConfig

func NewDefaultConfig() Config

NewDefaultConfig creates an instance of the package specific configuration, given a pointer to a logger instance to be used for logging within the package.

type NodeWallet

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

func NewNodeWallet

func NewNodeWallet(
	log *logging.Logger,
	vegaPaths paths.Paths,
	nodeWalletPassphrase string,
	nodeWallets *nodewallets.NodeWallets,
) (*NodeWallet, error)

func (*NodeWallet) Reload

func (nw *NodeWallet) Reload(_ *http.Request, args *NodeWalletArgs, reply *NodeWalletReloadReply) error

func (*NodeWallet) Show

func (nw *NodeWallet) Show(_ *http.Request, args *NodeWalletArgs, reply *Wallet) error

type NodeWalletArgs

type NodeWalletArgs struct {
	Chain string
}

type NodeWalletReloadReply

type NodeWalletReloadReply struct {
	OldWallet Wallet `json:"oldWallet"`
	NewWallet Wallet `json:"newWallet"`
}

type ProtocolUpgradeAdminService

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

func NewProtocolUpgradeService

func NewProtocolUpgradeService(protocolUpgradeService ProtocolUpgradeService) *ProtocolUpgradeAdminService

func (*ProtocolUpgradeAdminService) UpgradeStatus

type ProtocolUpgradeService

type ProtocolUpgradeService interface {
	// is vega core ready to be stopped and upgraded
	GetUpgradeStatus() types.UpgradeStatus
}

type ReadyForUpgradeArgs

type ReadyForUpgradeArgs struct{}

type Server

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

Server implement a socket server allowing to run simple RPC commands.

func NewNonValidatorServer

func NewNonValidatorServer(
	log *logging.Logger,
	config Config,
	protocolUpgradeService ProtocolUpgradeService,
) (*Server, error)

NewNonValidatorServer returns a new instance of the non-validator RPC socket server.

func NewValidatorServer

func NewValidatorServer(
	log *logging.Logger,
	config Config,
	vegaPaths paths.Paths,
	nodeWalletPassphrase string,
	nodeWallets *nodewallets.NodeWallets,
	protocolUpgradeService ProtocolUpgradeService,
) (*Server, error)

NewValidatorServer returns a new instance of the validator RPC socket server.

func (*Server) ReloadConf

func (s *Server) ReloadConf(cfg Config)

ReloadConf update the internal configuration of the server.

func (*Server) Start

func (s *Server) Start()

Start starts the server.

func (*Server) Stop

func (s *Server) Stop()

Stop stops the server.

type ServerConfig

type ServerConfig struct {
	SocketPath string `description:"Listen for connection on UNIX socket path <file-path>" long:"socket-path"`
	HTTPPath   string `description:"Http path of the socket HTTP RPC server"               long:"http-path"`
}

ServerConfig represent the configuration of the server.

type Wallet

type Wallet struct {
	Name      string `json:"name"`
	PublicKey string `json:"publicKey"`
}

Jump to

Keyboard shortcuts

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