admin

package
v0.66.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 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) FetchDeHistorySegment

func (s *Client) FetchDeHistorySegment(ctx context.Context, historySegmentID string) (store.SegmentIndexEntry, 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 DeHistoryAdminService

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

func NewDeHistoryAdminService

func NewDeHistoryAdminService(deHistoryService DeHistoryService) *DeHistoryAdminService

func (*DeHistoryAdminService) CopyHistorySegmentToFile

func (d *DeHistoryAdminService) CopyHistorySegmentToFile(req *http.Request, args *CopyHistorySegmentToFileArg, reply *CopyHistorySegmentToFileReply) error

func (*DeHistoryAdminService) FetchHistorySegment

func (d *DeHistoryAdminService) FetchHistorySegment(req *http.Request, historySegmentID *string, reply *store.SegmentIndexEntry) (err error)

type DeHistoryService

type DeHistoryService interface {
	CopyHistorySegmentToFile(ctx context.Context, historySegmentID string, outFile string) error
	FetchHistorySegment(ctx context.Context, historySegmentID string) (store.SegmentIndexEntry, error)
}

type Server

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

func NewServer

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