admin

package
v0.71.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 15 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
}

func NewClient

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

func (*Client) CopyHistorySegmentToFile

func (s *Client) CopyHistorySegmentToFile(ctx context.Context, historySegmentID string, filePath string) (CopyHistorySegmentToFileReply, error)

func (*Client) FetchNetworkHistorySegment added in v0.67.0

func (s *Client) FetchNetworkHistorySegment(ctx context.Context, historySegmentID string) (segment.Full, 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.

type CopyHistorySegmentToFileArg

type CopyHistorySegmentToFileArg struct {
	HistorySegmentID string
	OutFile          string
}

type CopyHistorySegmentToFileReply

type CopyHistorySegmentToFileReply struct {
	Reply string
	Err   error
}

type NetworkHistoryAdminService added in v0.67.0

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

func NewNetworkHistoryAdminService added in v0.67.0

func NewNetworkHistoryAdminService(networkHistoryService NetworkHistoryService) *NetworkHistoryAdminService

func (*NetworkHistoryAdminService) CopyHistorySegmentToFile added in v0.67.0

func (*NetworkHistoryAdminService) FetchHistorySegment added in v0.67.0

func (d *NetworkHistoryAdminService) FetchHistorySegment(req *http.Request, historySegmentID *string, reply *segment.Full) (err error)

type NetworkHistoryService added in v0.67.0

type NetworkHistoryService interface {
	CopyHistorySegmentToFile(ctx context.Context, historySegmentID string, outFile string) error
	FetchHistorySegment(ctx context.Context, historySegmentID string) (segment.Full, error)
}

type Server

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

func NewServer

func NewServer(log *logging.Logger, config Config, vegaPaths paths.Paths, service *NetworkHistoryAdminService) *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(ctx context.Context) error

Start starts the RPC based API server.

func (*Server) Stop

func (s *Server) Stop()

Stop stops the RPC based API 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 contains the configuration for the admin server.

Jump to

Keyboard shortcuts

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