Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CountInfo ¶
type CountInfo struct {
// contains filtered or unexported fields
}
CountInfo records a simple count
func NewCountInfo ¶
NewCountInfo creates a new CountInfo instance
type InfoProvider ¶
InfoProvider is a general interface to hold and render info for the status page.
When implementing InfoProvider - be aware of the 2 ways it is used by the status page:
when a single message is returned, the status page will display a single line: InfoKey(): Info()[0]
when multiple messages are returned, the status page will display an indented list: InfoKey(): Info()[0] Info()[1] Info()[n]
InfoKey only needs to be unique per source, and should be human readable.
type InfoRegistry ¶
type InfoRegistry struct {
// contains filtered or unexported fields
}
InfoRegistry keeps track of info providers
func NewInfoRegistry ¶
func NewInfoRegistry() *InfoRegistry
NewInfoRegistry creates a new InfoRegistry instance
func (*InfoRegistry) All ¶
func (i *InfoRegistry) All() []InfoProvider
All returns all registered info providers.
func (*InfoRegistry) Get ¶
func (i *InfoRegistry) Get(key string) InfoProvider
Get returns the provider for a given key, or nil
func (*InfoRegistry) Register ¶
func (i *InfoRegistry) Register(info InfoProvider)
Register adds an info provider
func (*InfoRegistry) Rendered ¶
func (i *InfoRegistry) Rendered() map[string][]string
Rendered renders the info for display on the status page.
type LogStatus ¶
type LogStatus struct {
// contains filtered or unexported fields
}
LogStatus tracks errors and success.
type MappedInfo ¶
type MappedInfo struct {
// contains filtered or unexported fields
}
MappedInfo collects multiple info messages with a unique key
func NewMappedInfo ¶
func NewMappedInfo(key string) *MappedInfo
NewMappedInfo creates a new MappedInfo instance
func (*MappedInfo) RemoveMessage ¶
func (m *MappedInfo) RemoveMessage(key string)
RemoveMessage removes a message with a unique key
func (*MappedInfo) SetMessage ¶
func (m *MappedInfo) SetMessage(key string, message string)
SetMessage sets a message with a unique key