services

package
v4.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: GPL-3.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartService

func StartService(svc Servicer, stopChan chan os.Signal)

Types

type ApiService

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

func NewApiService

func NewApiService(logger *slog.Logger) *ApiService

func (*ApiService) ApiUrl

func (s *ApiService) ApiUrl() string

func (*ApiService) Cleanup

func (s *ApiService) Cleanup()

func (*ApiService) Initialize

func (s *ApiService) Initialize() error

func (*ApiService) Logger

func (s *ApiService) Logger() *slog.Logger

func (*ApiService) Name

func (s *ApiService) Name() string

func (*ApiService) Process

func (s *ApiService) Process(ready chan bool) error

type ChildManager

type ChildManager interface {
	Pauser
	HasChild() bool
	KillChild() bool
	RestartChild() bool
}

type ControlService

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

func NewControlService

func NewControlService(logger *slog.Logger) *ControlService

func (*ControlService) AttachServiceManager

func (s *ControlService) AttachServiceManager(manager *ServiceManager)

func (*ControlService) Cleanup

func (s *ControlService) Cleanup()

func (*ControlService) Initialize

func (s *ControlService) Initialize() error

func (*ControlService) Logger

func (s *ControlService) Logger() *slog.Logger

func (*ControlService) Name

func (s *ControlService) Name() string

func (*ControlService) Process

func (s *ControlService) Process(ready chan bool) error

type IpfsService

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

func NewIpfsService

func NewIpfsService(logger *slog.Logger) *IpfsService

func (*IpfsService) ApiMultiaddr

func (s *IpfsService) ApiMultiaddr() string

func (*IpfsService) ApiPort

func (s *IpfsService) ApiPort() string

func (*IpfsService) Cleanup

func (s *IpfsService) Cleanup()

func (*IpfsService) Initialize

func (s *IpfsService) Initialize() error

func (*IpfsService) Logger

func (s *IpfsService) Logger() *slog.Logger

func (*IpfsService) Name

func (s *IpfsService) Name() string

func (*IpfsService) Process

func (s *IpfsService) Process(ready chan bool) error

func (*IpfsService) WasRunning

func (s *IpfsService) WasRunning() bool

type MonitorService

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

func NewMonitorService

func NewMonitorService(logger *slog.Logger) *MonitorService

func (*MonitorService) Cleanup

func (s *MonitorService) Cleanup()

func (*MonitorService) Initialize

func (s *MonitorService) Initialize() error

func (*MonitorService) IsPaused

func (s *MonitorService) IsPaused() bool

func (*MonitorService) Logger

func (s *MonitorService) Logger() *slog.Logger

func (*MonitorService) Name

func (s *MonitorService) Name() string

func (*MonitorService) Pause

func (s *MonitorService) Pause() bool

func (*MonitorService) Process

func (s *MonitorService) Process(ready chan bool) error

func (*MonitorService) Unpause

func (s *MonitorService) Unpause() bool

type Pauser

type Pauser interface {
	Servicer
	IsPaused() bool
	Pause() bool
	Unpause() bool
}

type ScrapeService

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

func NewScrapeService

func NewScrapeService(logger *slog.Logger, initMode string, configTargets []string, sleep int, blockCnt int) *ScrapeService

func (*ScrapeService) Cleanup

func (s *ScrapeService) Cleanup()

func (*ScrapeService) Initialize

func (s *ScrapeService) Initialize() error

func (*ScrapeService) IsPausable

func (s *ScrapeService) IsPausable() bool

func (*ScrapeService) IsPaused

func (s *ScrapeService) IsPaused() bool

func (*ScrapeService) Logger

func (s *ScrapeService) Logger() *slog.Logger

func (*ScrapeService) Name

func (s *ScrapeService) Name() string

func (*ScrapeService) Pause

func (s *ScrapeService) Pause() bool

func (*ScrapeService) Process

func (s *ScrapeService) Process(ready chan bool) error

func (*ScrapeService) Unpause

func (s *ScrapeService) Unpause() bool

type ServiceManager

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

func NewServiceManager

func NewServiceManager(services []Servicer, logger *slog.Logger) *ServiceManager

func (*ServiceManager) HandleSignals

func (sm *ServiceManager) HandleSignals()

func (*ServiceManager) IsPaused

func (sm *ServiceManager) IsPaused(name string) ([]map[string]string, error)

func (*ServiceManager) Pause

func (sm *ServiceManager) Pause(name string) ([]map[string]string, error)

func (*ServiceManager) StartAllServices

func (sm *ServiceManager) StartAllServices() error

func (*ServiceManager) Unpause

func (sm *ServiceManager) Unpause(name string) ([]map[string]string, error)

type Servicer

type Servicer interface {
	Name() string
	Initialize() error
	Process(chan bool) error
	Cleanup()
	Logger() *slog.Logger
}

Jump to

Keyboard shortcuts

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