Documentation
¶
Index ¶
Constants ¶
const (
ServiceName = types.ListenersServiceName
)
Variables ¶
var ( ErrServiceNotInitialized = "Service not initialized" ErrNilConfigService = "ConfigService is nil" ErrNilLoggerService = "LoggerService is nil" )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
ConfigService *config.Service `di.inject:"configservice"`
Logger *logging.Service `di.inject:"loggingservice"`
ListenerConfigs []types.ListenerConfig
// contains filtered or unexported fields
}
func (*Service) Initialize ¶
func (*Service) Start ¶
Start begins listening on all configured network listeners.
The method transitions through several phases:
- Normalize and validate configurations
- Resolve network addresses (may involve DNS lookups)
- Bind all listeners atomically (if any bind fails, all are rolled back)
- Launch listener goroutines
Context Cancellation: The provided context is passed to listener goroutines. If the context is cancelled, all listener goroutines will exit, but the service state remains stateRunning. This is intentional - the service does not automatically transition state on context cancellation. Callers MUST call Stop() to properly clean up and reset state before calling Start() again. A subsequent Start() call while in stateRunning will return nil with a log message "already running".
Thread Safety: Start() is safe to call concurrently with Stop(). If Stop() is called during startup (phases 1-3), Start() will detect this and abort without launching goroutines.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package handlers provides pluggable packet handler support for network listeners.
|
Package handlers provides pluggable packet handler support for network listeners. |
|
wsjtx
Package wsjtx implements a packet handler for the WSJT-X and JTDX UDP protocol.
|
Package wsjtx implements a packet handler for the WSJT-X and JTDX UDP protocol. |