Documentation
¶
Index ¶
- Constants
- func Debug(message string, opts ...StatusOption)
- func Error(message string, opts ...StatusOption)
- func Info(message string, opts ...StatusOption)
- func InitService() error
- func Subscribe(ctx context.Context) <-chan pubsub.Event[StatusMessage]
- func Warn(message string, opts ...StatusOption)
- type Level
- type Service
- type StatusMessage
- type StatusOption
Constants ¶
View Source
const (
EventStatusPublished pubsub.EventType = "status_published"
)
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(message string, opts ...StatusOption)
func Error ¶
func Error(message string, opts ...StatusOption)
func Info ¶
func Info(message string, opts ...StatusOption)
func InitService ¶
func InitService() error
func Warn ¶
func Warn(message string, opts ...StatusOption)
Types ¶
type Service ¶
type Service interface { pubsub.Subscriber[StatusMessage] Info(message string, opts ...StatusOption) Warn(message string, opts ...StatusOption) Error(message string, opts ...StatusOption) Debug(message string, opts ...StatusOption) }
func GetService ¶
func GetService() Service
type StatusMessage ¶
type StatusOption ¶ added in v0.0.49
type StatusOption func(*StatusMessage)
StatusOption is a function that configures a status message
func WithCritical ¶ added in v0.0.49
func WithCritical(critical bool) StatusOption
WithCritical marks a status message as critical, causing it to be displayed immediately
func WithDuration ¶ added in v0.0.49
func WithDuration(duration time.Duration) StatusOption
WithDuration sets a custom display duration for a status message
Click to show internal directories.
Click to hide internal directories.