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 ¶
- type Deps
- type GetSystemLogLogic
- type GetVersionLogic
- type QueryIPLocationLogic
- type RestartSystemLogic
- type Service
- func (s *Service) GetSystemLog(ctx context.Context) (*dto.LogResponse, error)
- func (s *Service) GetVersion(ctx context.Context) (*dto.VersionResponse, error)
- func (s *Service) QueryIPLocation(ctx context.Context, req *dto.QueryIPLocationRequest) (*dto.QueryIPLocationResponse, error)
- func (s *Service) RestartSystem(ctx context.Context) error
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 ¶
func (*GetSystemLogLogic) GetSystemLog ¶
func (l *GetSystemLogLogic) GetSystemLog() (resp *dto.LogResponse, err error)
type GetVersionLogic ¶
func (*GetVersionLogic) GetVersion ¶
func (l *GetVersionLogic) GetVersion() (resp *dto.VersionResponse, err error)
type QueryIPLocationLogic ¶
func (*QueryIPLocationLogic) QueryIPLocation ¶
func (l *QueryIPLocationLogic) QueryIPLocation(req *dto.QueryIPLocationRequest) (resp *dto.QueryIPLocationResponse, err error)
type RestartSystemLogic ¶
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 (*Service) GetSystemLog ¶
func (*Service) GetVersion ¶
func (*Service) QueryIPLocation ¶
func (s *Service) QueryIPLocation(ctx context.Context, req *dto.QueryIPLocationRequest) (*dto.QueryIPLocationResponse, error)
Click to show internal directories.
Click to hide internal directories.