Documentation ¶
Index ¶
- func LogEnumStrings() []string
- func LogLevelStrings() []string
- type Event
- type EventId
- type EventListener
- type EventT
- type Hub
- type HubLogger
- func (me HubLogger) Hub() string
- func (me HubLogger) LogDebug(enm LogEnum, topic string, lsner string)
- func (me HubLogger) LogError(enm LogEnum, topic string, lsner string, err any)
- func (me HubLogger) LogEventDebug(enm LogEnum, lsner string, evnt Event)
- func (me HubLogger) LogEventError(enm LogEnum, lsner string, evnt Event, err any)
- func (me HubLogger) LogEventInfo(enm LogEnum, lsner string, evnt Event)
- func (me HubLogger) LogInfo(enm LogEnum, topic string, lsner string)
- type HubLoggerT
- type HubT
- type LevelFilteringLogger
- func (me LevelFilteringLogger) LogDebug(enm LogEnum, hub string, topic string, lsner string)
- func (me LevelFilteringLogger) LogError(enm LogEnum, hub string, topic string, lsner string, err any)
- func (me LevelFilteringLogger) LogEventDebug(enm LogEnum, lsner string, evnt Event)
- func (me LevelFilteringLogger) LogEventError(enm LogEnum, lsner string, evnt Event, err any)
- func (me LevelFilteringLogger) LogEventInfo(enm LogEnum, lsner string, evnt Event)
- func (me LevelFilteringLogger) LogInfo(enm LogEnum, hub string, topic string, lsner string)
- func (me LevelFilteringLogger) Target() Logger
- type LevelFilteringLoggerT
- type Listener
- type ListenerLogger
- func (me ListenerLogger) Listener() string
- func (me ListenerLogger) LogDebug(enm LogEnum)
- func (me ListenerLogger) LogError(enm LogEnum, err any)
- func (me ListenerLogger) LogEventDebug(enm LogEnum, evnt Event)
- func (me ListenerLogger) LogEventError(enm LogEnum, evnt Event, err any)
- func (me ListenerLogger) LogEventInfo(enm LogEnum, evnt Event)
- func (me ListenerLogger) LogInfo(enm LogEnum)
- type ListenerLoggerT
- type LogEnum
- func (i LogEnum) IsALogEnum() bool
- func (i LogEnum) MarshalGQL(w io.Writer)
- func (i LogEnum) MarshalJSON() ([]byte, error)
- func (i LogEnum) MarshalText() ([]byte, error)
- func (i LogEnum) MarshalYAML() (interface{}, error)
- func (i *LogEnum) Scan(value interface{}) error
- func (i LogEnum) String() string
- func (i *LogEnum) UnmarshalGQL(value interface{}) error
- func (i *LogEnum) UnmarshalJSON(data []byte) error
- func (i *LogEnum) UnmarshalText(text []byte) error
- func (i *LogEnum) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (i LogEnum) Value() (driver.Value, error)
- type LogLevel
- func (i LogLevel) IsALogLevel() bool
- func (i LogLevel) MarshalGQL(w io.Writer)
- func (i LogLevel) MarshalJSON() ([]byte, error)
- func (i LogLevel) MarshalText() ([]byte, error)
- func (i LogLevel) MarshalYAML() (interface{}, error)
- func (i *LogLevel) Scan(value interface{}) error
- func (i LogLevel) String() string
- func (i *LogLevel) UnmarshalGQL(value interface{}) error
- func (i *LogLevel) UnmarshalJSON(data []byte) error
- func (i *LogLevel) UnmarshalText(text []byte) error
- func (i *LogLevel) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (i LogLevel) Value() (driver.Value, error)
- type Logger
- type PubMode
- type Topic
- type TopicBase
- type TopicImpl
- func (me *TopicImpl[K]) Close(wait bool)
- func (me *TopicImpl[K]) CurrEventId() EventId
- func (me *TopicImpl[K]) EventType() reflect.Type
- func (me *TopicImpl[K]) Hub() Hub
- func (me *TopicImpl[K]) Name() string
- func (me *TopicImpl[K]) NewEventId() EventId
- func (me *TopicImpl[K]) Pub(mode PubMode, sender any, evntData K)
- func (me *TopicImpl[K]) Sub(name string, lsner Listener[K], qSize uint32) (int, error)
- func (me *TopicImpl[K]) SubP(name string, lsner Listener[K], qSize uint32) int
- func (me *TopicImpl[K]) UnSub(name string) bool
- type TopicLogger
- func (me TopicLogger) LogDebug(enm LogEnum, lsner string)
- func (me TopicLogger) LogError(enm LogEnum, lsner string, err any)
- func (me TopicLogger) LogEventDebug(enm LogEnum, lsner string, evnt Event)
- func (me TopicLogger) LogEventError(enm LogEnum, lsner string, evnt Event, err any)
- func (me TopicLogger) LogEventInfo(enm LogEnum, lsner string, evnt Event)
- func (me TopicLogger) LogInfo(enm LogEnum, lsner string)
- func (me TopicLogger) Topic() string
- type TopicLoggerT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogEnumStrings ¶
func LogEnumStrings() []string
LogEnumStrings returns a slice of all String values of the enum
func LogLevelStrings ¶
func LogLevelStrings() []string
LogLevelStrings returns a slice of all String values of the enum
Types ¶
type EventListener ¶
type EventListener[K any] struct { // contains filtered or unexported fields }
func NewEventListener ¶
func NewEventListener[K any](name string, lsner Listener[K], qSize uint32, topicLogr TopicLogger) *EventListener[K]
func (*EventListener[K]) SendEvent ¶
func (me *EventListener[K]) SendEvent(evnt Event)
func (*EventListener[K]) Start ¶
func (me *EventListener[K]) Start()
func (*EventListener[K]) Stop ¶
func (me *EventListener[K]) Stop(stopEvnt Event)
type HubLogger ¶
type HubLogger = *HubLoggerT
func NewHubLogger ¶
func (HubLogger) LogEventDebug ¶
func (HubLogger) LogEventError ¶
func (HubLogger) LogEventInfo ¶
type HubLoggerT ¶
type HubLoggerT struct {
// contains filtered or unexported fields
}
type LevelFilteringLogger ¶
type LevelFilteringLogger = *LevelFilteringLoggerT
func NewLevelFilteringLogger ¶
func NewLevelFilteringLogger(level LogLevel, target Logger) LevelFilteringLogger
func (LevelFilteringLogger) LogDebug ¶
func (me LevelFilteringLogger) LogDebug(enm LogEnum, hub string, topic string, lsner string)
func (LevelFilteringLogger) LogEventDebug ¶
func (me LevelFilteringLogger) LogEventDebug(enm LogEnum, lsner string, evnt Event)
func (LevelFilteringLogger) LogEventError ¶
func (me LevelFilteringLogger) LogEventError(enm LogEnum, lsner string, evnt Event, err any)
func (LevelFilteringLogger) LogEventInfo ¶
func (me LevelFilteringLogger) LogEventInfo(enm LogEnum, lsner string, evnt Event)
func (LevelFilteringLogger) LogInfo ¶
func (me LevelFilteringLogger) LogInfo(enm LogEnum, hub string, topic string, lsner string)
func (LevelFilteringLogger) Target ¶
func (me LevelFilteringLogger) Target() Logger
type LevelFilteringLoggerT ¶
type LevelFilteringLoggerT struct { Level LogLevel // contains filtered or unexported fields }
type ListenerLogger ¶
type ListenerLogger = *ListenerLoggerT
func NewListenerLogger ¶
func NewListenerLogger(lsner string, logr TopicLogger) ListenerLogger
func (ListenerLogger) Listener ¶
func (me ListenerLogger) Listener() string
func (ListenerLogger) LogDebug ¶
func (me ListenerLogger) LogDebug(enm LogEnum)
func (ListenerLogger) LogError ¶
func (me ListenerLogger) LogError(enm LogEnum, err any)
func (ListenerLogger) LogEventDebug ¶
func (me ListenerLogger) LogEventDebug(enm LogEnum, evnt Event)
func (ListenerLogger) LogEventError ¶
func (me ListenerLogger) LogEventError(enm LogEnum, evnt Event, err any)
func (ListenerLogger) LogEventInfo ¶
func (me ListenerLogger) LogEventInfo(enm LogEnum, evnt Event)
func (ListenerLogger) LogInfo ¶
func (me ListenerLogger) LogInfo(enm LogEnum)
type ListenerLoggerT ¶
type ListenerLoggerT struct {
// contains filtered or unexported fields
}
type LogEnum ¶
type LogEnum int64
const ( HubCloseBegin LogEnum HubCloseOk ListenerSubOk ListenerSubErr ListenerUnsubOk ListenerUnsubErr ListenerCloseBegin ListenerCloseOk TopicRegisterBegin TopicRegisterOk TopicCloseBegin TopicCloseOk EventPubBegin EventPubError EventPubOk EventSendBegin EventSendOk EventHandleBegin EventHandleOk EventHandleErr )
func LogEnumString ¶
LogEnumString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (LogEnum) IsALogEnum ¶
IsALogEnum returns "true" if the value is listed in the enum definition. "false" otherwise
func (LogEnum) MarshalGQL ¶
MarshalGQL implements the graphql.Marshaler interface for LogEnum
func (LogEnum) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for LogEnum
func (LogEnum) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for LogEnum
func (LogEnum) MarshalYAML ¶
MarshalYAML implements a YAML Marshaler for LogEnum
func (*LogEnum) UnmarshalGQL ¶
UnmarshalGQL implements the graphql.Unmarshaler interface for LogEnum
func (*LogEnum) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for LogEnum
func (*LogEnum) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for LogEnum
func (*LogEnum) UnmarshalYAML ¶
UnmarshalYAML implements a YAML Unmarshaler for LogEnum
type LogLevel ¶
type LogLevel int8
const ( LogLevelAnyway LogLevel LogLevelDebug LogLevelInfo LogLevelError LogLevelSilient LogLevel = 127 )
func LogLevelString ¶
LogLevelString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func LogLevelValues ¶
func LogLevelValues() []LogLevel
LogLevelValues returns all values of the enum
func (LogLevel) IsALogLevel ¶
IsALogLevel returns "true" if the value is listed in the enum definition. "false" otherwise
func (LogLevel) MarshalGQL ¶
MarshalGQL implements the graphql.Marshaler interface for LogLevel
func (LogLevel) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for LogLevel
func (LogLevel) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for LogLevel
func (LogLevel) MarshalYAML ¶
MarshalYAML implements a YAML Marshaler for LogLevel
func (*LogLevel) UnmarshalGQL ¶
UnmarshalGQL implements the graphql.Unmarshaler interface for LogLevel
func (*LogLevel) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for LogLevel
func (*LogLevel) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for LogLevel
func (*LogLevel) UnmarshalYAML ¶
UnmarshalYAML implements a YAML Unmarshaler for LogLevel
type Logger ¶
type Logger interface { LogDebug(enm LogEnum, hub string, topic string, lsner string) LogInfo(enm LogEnum, hub string, topic string, lsner string) LogError(enm LogEnum, hub string, topic string, lsner string, err any) LogEventDebug(enm LogEnum, lsner string, evnt Event) LogEventInfo(enm LogEnum, lsner string, evnt Event) LogEventError(enm LogEnum, lsner string, evnt Event, err any) }
type Topic ¶
type TopicImpl ¶
type TopicImpl[K any] struct { // contains filtered or unexported fields }
func NewTopicImpl ¶
func (*TopicImpl[K]) CurrEventId ¶
func (*TopicImpl[K]) NewEventId ¶
type TopicLogger ¶
type TopicLogger = *TopicLoggerT
func NewTopicLogger ¶
func NewTopicLogger(topic string, logr HubLogger) TopicLogger
func (TopicLogger) LogDebug ¶
func (me TopicLogger) LogDebug(enm LogEnum, lsner string)
func (TopicLogger) LogEventDebug ¶
func (me TopicLogger) LogEventDebug(enm LogEnum, lsner string, evnt Event)
func (TopicLogger) LogEventError ¶
func (me TopicLogger) LogEventError(enm LogEnum, lsner string, evnt Event, err any)
func (TopicLogger) LogEventInfo ¶
func (me TopicLogger) LogEventInfo(enm LogEnum, lsner string, evnt Event)
func (TopicLogger) LogInfo ¶
func (me TopicLogger) LogInfo(enm LogEnum, lsner string)
func (TopicLogger) Topic ¶
func (me TopicLogger) Topic() string
type TopicLoggerT ¶
type TopicLoggerT struct {
// contains filtered or unexported fields
}