tool

package
v1.20.3 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Service assembly for the tool subdomain of the platform module: system log tail, version info, IP geolocation and process restart. Only the module facade may reach it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	// LogPath is the logger output file read by the system-log tail.
	LogPath string
	// GeoIP returns the GeoIP database reader; nil (or a nil result) means
	// no database is configured.
	GeoIP func() *geoip2.Reader
	// Restart restarts the transport server.
	Restart func() error
}

Deps declares the subdomain's dependencies; the module facade forwards them from the composition root.

type GetSystemLogLogic

type GetSystemLogLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetSystemLogLogic) GetSystemLog

func (l *GetSystemLogLogic) GetSystemLog() (resp *dto.LogResponse, err error)

type GetVersionLogic

type GetVersionLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetVersionLogic) GetVersion

func (l *GetVersionLogic) GetVersion() (resp *dto.VersionResponse, err error)

type QueryIPLocationLogic

type QueryIPLocationLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*QueryIPLocationLogic) QueryIPLocation

func (l *QueryIPLocationLogic) QueryIPLocation(req *dto.QueryIPLocationRequest) (resp *dto.QueryIPLocationResponse, err error)

type RestartSystemLogic

type RestartSystemLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*RestartSystemLogic) RestartSystem

func (l *RestartSystemLogic) RestartSystem() error

type Service

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

Service is the tool entry point used by the platform facade.

func NewService

func NewService(deps Deps) *Service

func (*Service) GetSystemLog

func (s *Service) GetSystemLog(ctx context.Context) (*dto.LogResponse, error)

func (*Service) GetVersion

func (s *Service) GetVersion(ctx context.Context) (*dto.VersionResponse, error)

func (*Service) QueryIPLocation

func (*Service) RestartSystem

func (s *Service) RestartSystem(ctx context.Context) error

Jump to

Keyboard shortcuts

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