admin

package
v0.0.0-...-141c82c Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 16 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

func (s *Client) FetchNetworkHistorySegment(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 NetworkHistoryAdminService

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

func NewNetworkHistoryAdminService

func NewNetworkHistoryAdminService(networkHistoryService NetworkHistoryService) *NetworkHistoryAdminService

func (*NetworkHistoryAdminService) CopyHistorySegmentToFile

func (*NetworkHistoryAdminService) FetchHistorySegment

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

type NetworkHistoryService

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

type Server

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

func NewServer

func NewServer(log *logging.Logger, config Config, zetaPaths 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