Documentation ¶
Index ¶
- Variables
- func AnyString(s string) *commonv1.AnyValue
- func Base64(b []byte) string
- func DeBase64(s string) []byte
- func DeHex(s string) []byte
- func Hex(b []byte) string
- func InitServer()
- func Kv(d map[string]string) []*commonv1.KeyValue
- func PrintVersion()
- func Run()
- type ConfigModel
- type SnoozeAlertV1
- type SnoozeClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version string Commit string )
Functions ¶
func InitServer ¶
func InitServer()
func PrintVersion ¶
func PrintVersion()
Types ¶
type ConfigModel ¶
type ConfigModel struct { // IP address the gRPC server should bind to GrpcListeningAddress string `mapstructure:"GRPC_LISTENING_ADDRESS"` // Port number the gRPC server should bind to GrpcListeningPort int `mapstructure:"GRPC_LISTENING_PORT"` // Snooze URL to send alerts to. Will use the // path <url>/api/alerts to send alerts SnoozeUrl string `mapstructure:"SNOOZE_URL"` // Path to a pem formatted certificate authority when // communicating with the snooze server in HTTPS SnoozeCaPath string `mapstructure:"SNOOZE_CA_PATH"` // A logrus log level (trace/debug/info/warning/error/fatal/panic). LogLevel string `mapstructure:"LOG_LEVEL"` // Whether to enable prometheus metrics PrometheusEnable bool `mapstructure:"PROMETHEUS_ENABLE"` // Port the prometheus exporter should listen to PrometheusPort int `mapstructure:"PROMETHEUS_PORT"` }
var Config ConfigModel
type SnoozeAlertV1 ¶
type SnoozeAlertV1 struct { Source string `json:"source"` Timestamp string `json:"timestamp"` Host string `json:"host"` Process string `json:"process"` Severity string `json:"severity"` ExceptionType string `json:"exception_type,omitempty"` ExceptionMessage string `json:"exception_message,omitempty"` ExceptionStack string `json:"exception_trace,omitempty"` Message string `json:"message"` Attributes map[string]string `json:"attributes"` }
type SnoozeClient ¶
type SnoozeClient struct {
// contains filtered or unexported fields
}
var Snooze SnoozeClient
Click to show internal directories.
Click to hide internal directories.