Documentation
¶
Index ¶
- func AddGlobalError(key string, errorMessage string)
- func AddGlobalWarning(key string, warning string)
- func Clear()
- func Init(isRunning *int32, endpoints *types.Endpoints, sources *config.LogSources, ...)
- func InitStatus(sources *config.LogSources)
- func RemoveGlobalWarning(key string)
- type Builder
- type Integration
- type Source
- type Status
- type Transport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGlobalError ¶
AddGlobalError an error message for the status display (errors will stop the agent)
func AddGlobalWarning ¶
AddGlobalWarning keeps track of a warning message to display on the status.
func Clear ¶
func Clear()
Clear clears the status which means it needs to be initialized again to be used.
func Init ¶
func Init(isRunning *int32, endpoints *types.Endpoints, sources *config.LogSources, logExpVars *expvar.Map)
Init instantiates the builder that builds the status on the fly.
func InitStatus ¶
func InitStatus(sources *config.LogSources)
InitStatus initialize a status builder
func RemoveGlobalWarning ¶
func RemoveGlobalWarning(key string)
RemoveGlobalWarning loses track of a warning message that does not need to be displayed on the status anymore.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is used to build the status.
func NewBuilder ¶
func NewBuilder(isRunning *int32, endpoints *types.Endpoints, sources *config.LogSources, warnings *config.Messages, errors *config.Messages, logExpVars *expvar.Map) *Builder
NewBuilder returns a new builder.
func (*Builder) BuildStatus ¶
BuildStatus returns the status of the logs-agent.
type Integration ¶
Integration provides some information about a logs integration.
type Source ¶
type Source struct { BytesRead int64 `json:"bytesRead"` AllTimeAvgLatency int64 `json:"allTimeAvgLatency"` AllTimePeakLatency int64 `json:"allTimePeakLatency"` RecentAvgLatency int64 `json:"recentAvgLatency"` RecentPeakLatency int64 `json:"recentPeakLatency"` Type string `json:"type"` Configuration map[string]interface{} `json:"configuration"` Status string `json:"status"` Inputs []string `json:"inputs"` Messages []string `json:"messages"` Info map[string][]string `json:"info"` }
Source provides some information about a logs source.
type Status ¶
type Status struct { IsRunning bool `json:"isRunning"` Endpoints []string `json:"endpoints"` StatusMetrics map[string]int64 `json:"metrics"` Integrations []Integration `json:"integrations"` Errors []string `json:"errors"` Warnings []string `json:"warnings"` UseHTTP bool `json:"useHttp"` }
Status provides some information about logs-agent.