admin

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT 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

Client 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(r *http.Request, args *NodeWalletArgs, reply *NodeWalletReloadReply) error

func (*NodeWallet) Show

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

type NodeWalletArgs

type NodeWalletArgs struct {
	Chain string
}

type NodeWalletReloadReply

type NodeWalletReloadReply struct {
	OldWallet Wallet
	NewWallet Wallet
}

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,
	vegaPaths paths.Paths,
	protocolUpgradeService ProtocolUpgradeService,
) (*Server, error)

func NewValidatorServer

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

NewServer returns a new instance of the 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 start the server.

func (*Server) Stop

func (s *Server) Stop()

Stop stops the server.

type ServerConfig

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

ServerConfig represent the configuration of the server.

type Wallet

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

func (*Wallet) String

func (w *Wallet) String() string

Jump to

Keyboard shortcuts

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