reloader

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package reloader provides a service that listens to file change notifications and issues an application-wide reload

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IFilewatcher

type IFilewatcher interface {
	Update() error
	Listen() <-chan interface{}
}

type IGenerators added in v1.4.0

type IGenerators interface {
	ValidateTemplates() error
}

type ILidDetector added in v1.3.0

type ILidDetector interface {
	Reload(context.Context) error
}

type IPowerDetector

type IPowerDetector interface {
	Reload(context.Context) error
}

type IService

type IService interface {
	UpdateOnce(context.Context) error
}

type Service

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

func NewService

func NewService(cfg *config.Config, filewatcher IFilewatcher, powerDetector IPowerDetector,
	service IService, disableAutoHotReload bool, lidDetector ILidDetector, gen IGenerators,
) *Service

func (*Service) Handle

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

func (*Service) Reload

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

func (*Service) Run

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

Jump to

Keyboard shortcuts

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