Documentation ¶
Index ¶
- type Dependency
- type FileHandlerFunc
- type IsFileWatcher
- type NeedsFileWatcher
- type Service
- func (s *Service) AddWatcher(path string, f func(path string) error)
- func (s *Service) CloseWatcher()
- func (s *Service) Init(mesh servicemesh.Mesh)
- func (s *Service) Logger() *slog.Logger
- func (s *Service) Name() string
- func (s *Service) OnServiceAdded(service servicemesh.Service)
- func (s *Service) Ready() bool
- func (s *Service) SetLogger(logger *slog.Logger)
- func (s *Service) WatchAndLoad(path string, f func(path string) error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Dependency = IsFileWatcher
type FileHandlerFunc ¶
type IsFileWatcher ¶
type NeedsFileWatcher ¶
type NeedsFileWatcher interface {
FileHandlers() map[string]FileHandlerFunc
}
NeedsFileWatcher is an integration interface intended to be implemented by other services to integrate with and be maintained by this file watcher service.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) AddWatcher ¶
AddWatcher watches the given file for changes and invokes f with the file path when a change is detected.
func (*Service) CloseWatcher ¶
func (s *Service) CloseWatcher()
CloseWatcher closes the watcher for file changes.
func (*Service) Init ¶
func (s *Service) Init(mesh servicemesh.Mesh)
func (*Service) OnServiceAdded ¶
func (s *Service) OnServiceAdded(service servicemesh.Service)
Click to show internal directories.
Click to hide internal directories.