diagnostic

package
v1.4.1-rc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2018 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const RFC3339Milli = "2006-01-02T15:04:05.000Z07:00"

Variables

This section is empty.

Functions

func Debug

func Debug(l Logger, msg string, ctx []keyvalue.T)

func Err

func Err(l Logger, msg string, err error, ctx []keyvalue.T)

func Info

func Info(l Logger, msg string, ctx []keyvalue.T)

Types

type AlertServiceHandler

type AlertServiceHandler struct {
	L Logger
}

func (*AlertServiceHandler) CreatingNewHandlers

func (h *AlertServiceHandler) CreatingNewHandlers(length int)

func (*AlertServiceHandler) Error

func (h *AlertServiceHandler) Error(msg string, err error, ctx ...keyvalue.T)

func (*AlertServiceHandler) FoundHandlerRows

func (h *AlertServiceHandler) FoundHandlerRows(length int)

func (*AlertServiceHandler) FoundNewHandler

func (h *AlertServiceHandler) FoundNewHandler(key string)

func (*AlertServiceHandler) MigratingHandlerSpecs

func (h *AlertServiceHandler) MigratingHandlerSpecs()

func (*AlertServiceHandler) MigratingOldHandlerSpec

func (h *AlertServiceHandler) MigratingOldHandlerSpec(spec string)

func (*AlertServiceHandler) WithHandlerContext

func (h *AlertServiceHandler) WithHandlerContext(ctx ...keyvalue.T) alertservice.HandlerDiagnostic

type AlertaHandler

type AlertaHandler struct {
	// contains filtered or unexported fields
}

func (*AlertaHandler) Error

func (h *AlertaHandler) Error(msg string, err error)

func (*AlertaHandler) TemplateError

func (h *AlertaHandler) TemplateError(err error, kv keyvalue.T)

func (*AlertaHandler) WithContext

func (h *AlertaHandler) WithContext(ctx ...keyvalue.T) alerta.Diagnostic

type BoolField

type BoolField struct {
	// contains filtered or unexported fields
}

Bool

func (BoolField) Match

func (s BoolField) Match(key, value string) bool

func (BoolField) WriteJSONTo

func (s BoolField) WriteJSONTo(w Writer) (n int64, err error)

func (BoolField) WriteLogfmtTo

func (s BoolField) WriteLogfmtTo(w Writer) (n int64, err error)

type CmdHandler

type CmdHandler struct {
	// contains filtered or unexported fields
}

func BootstrapMainHandler

func BootstrapMainHandler() *CmdHandler

func (*CmdHandler) Error

func (h *CmdHandler) Error(msg string, err error)

func (*CmdHandler) GoVersion

func (h *CmdHandler) GoVersion()

func (*CmdHandler) Info

func (h *CmdHandler) Info(msg string)

func (*CmdHandler) KapacitorStarting

func (h *CmdHandler) KapacitorStarting(version, branch, commit string)

type Config

type Config struct {
	File  string `toml:"file"`
	Level string `toml:"level"`
}

func NewConfig

func NewConfig() Config

type ConfigOverrideHandler

type ConfigOverrideHandler struct {
	// contains filtered or unexported fields
}

func (*ConfigOverrideHandler) Error

func (h *ConfigOverrideHandler) Error(msg string, err error)

type DeadmanHandler

type DeadmanHandler struct {
	// contains filtered or unexported fields
}

func (*DeadmanHandler) ConfiguredGlobally

func (h *DeadmanHandler) ConfiguredGlobally()

type Diagnostic

type Diagnostic interface {
	CreatedLogSession(id uuid.UUID, contentType string, tags []tag)
	DeletedLogSession(id uuid.UUID, contentType string, tags []tag)
}

type DurationField

type DurationField struct {
	// contains filtered or unexported fields
}

Duration

func (DurationField) Match

func (s DurationField) Match(key, value string) bool

func (DurationField) WriteJSONTo

func (s DurationField) WriteJSONTo(w Writer) (n int64, err error)

func (DurationField) WriteLogfmtTo

func (s DurationField) WriteLogfmtTo(w Writer) (n int64, err error)

type EC2Handler

type EC2Handler struct {
	*ScraperHandler
}

func (*EC2Handler) WithClusterContext

func (h *EC2Handler) WithClusterContext(cluster string) ec2.Diagnostic

type EdgeHandler

type EdgeHandler struct {
	// contains filtered or unexported fields
}

func (*EdgeHandler) Collect

func (h *EdgeHandler) Collect(mtype edge.MessageType)

func (*EdgeHandler) Emit

func (h *EdgeHandler) Emit(mtype edge.MessageType)

type ErrorField

type ErrorField struct {
	// contains filtered or unexported fields
}

Error

func (ErrorField) Match

func (s ErrorField) Match(key, value string) bool

func (ErrorField) WriteJSONTo

func (s ErrorField) WriteJSONTo(w Writer) (n int64, err error)

func (ErrorField) WriteLogfmtTo

func (s ErrorField) WriteLogfmtTo(w Writer) (n int64, err error)

type Field

type Field interface {
	WriteJSONTo(w Writer) (n int64, err error)
	WriteLogfmtTo(w Writer) (n int64, err error)
	Match(key, value string) bool
}

func Bool

func Bool(key string, value bool) Field

func Duration

func Duration(key string, value time.Duration) Field

func Error

func Error(err error) Field

func FieldPairs

func FieldPairs(tags models.Fields) []Field

func Float64

func Float64(key string, value float64) Field

func GroupedFields

func GroupedFields(key string, fields []Field) Field

func Int

func Int(key string, value int) Field

func Int64

func Int64(key string, value int64) Field

func String

func String(key string, value string) Field

func Stringer

func Stringer(key string, value fmt.Stringer) Field

func Strings

func Strings(key string, values []string) Field

func TagPairs

func TagPairs(tags models.Tags) []Field

func Time

func Time(key string, value time.Time) Field

type Float64Field

type Float64Field struct {
	// contains filtered or unexported fields
}

Float64

func (Float64Field) Match

func (s Float64Field) Match(key, value string) bool

func (Float64Field) WriteJSONTo

func (s Float64Field) WriteJSONTo(w Writer) (n int64, err error)

func (Float64Field) WriteLogfmtTo

func (s Float64Field) WriteLogfmtTo(w Writer) (n int64, err error)

type GroupedField

type GroupedField struct {
	// contains filtered or unexported fields
}

func (GroupedField) Match

func (s GroupedField) Match(key, value string) bool

func (GroupedField) WriteJSONTo

func (s GroupedField) WriteJSONTo(w Writer) (n int64, err error)

func (GroupedField) WriteLogfmtTo

func (s GroupedField) WriteLogfmtTo(w Writer) (n int64, err error)

type HTTPDHandler

type HTTPDHandler struct {
	// contains filtered or unexported fields
}

func (*HTTPDHandler) AuthenticationEnabled

func (h *HTTPDHandler) AuthenticationEnabled(enabled bool)

func (*HTTPDHandler) Error

func (h *HTTPDHandler) Error(msg string, err error)

func (*HTTPDHandler) HTTP

func (h *HTTPDHandler) HTTP(
	host string,
	username string,
	start time.Time,
	method string,
	uri string,
	proto string,
	status int,
	referer string,
	userAgent string,
	reqID string,
	duration time.Duration,
)

func (*HTTPDHandler) ListeningOn

func (h *HTTPDHandler) ListeningOn(addr string, proto string)

func (*HTTPDHandler) NewHTTPServerErrorLogger

func (h *HTTPDHandler) NewHTTPServerErrorLogger() *log.Logger

func (*HTTPDHandler) RecoveryError

func (h *HTTPDHandler) RecoveryError(
	msg string,
	err string,
	host string,
	username string,
	start time.Time,
	method string,
	uri string,
	proto string,
	status int,
	referer string,
	userAgent string,
	reqID string,
	duration time.Duration,
)

func (*HTTPDHandler) ShutdownTimeout

func (h *HTTPDHandler) ShutdownTimeout()

func (*HTTPDHandler) StartingService

func (h *HTTPDHandler) StartingService()

func (*HTTPDHandler) StoppedService

func (h *HTTPDHandler) StoppedService()

func (*HTTPDHandler) WriteBodyReceived

func (h *HTTPDHandler) WriteBodyReceived(body string)

type HTTPPostHandler

type HTTPPostHandler struct {
	// contains filtered or unexported fields
}

func (*HTTPPostHandler) Error

func (h *HTTPPostHandler) Error(msg string, err error, ctx ...keyvalue.T)

func (*HTTPPostHandler) WithContext

func (h *HTTPPostHandler) WithContext(ctx ...keyvalue.T) httppost.Diagnostic

type HipChatHandler

type HipChatHandler struct {
	// contains filtered or unexported fields
}

HipChat handler

func (*HipChatHandler) Error

func (h *HipChatHandler) Error(msg string, err error)

func (*HipChatHandler) WithContext

func (h *HipChatHandler) WithContext(ctx ...keyvalue.T) hipchat.Diagnostic

type InfluxDBHandler

type InfluxDBHandler struct {
	// contains filtered or unexported fields
}

func (*InfluxDBHandler) Error

func (h *InfluxDBHandler) Error(msg string, err error, ctx ...keyvalue.T)

func (*InfluxDBHandler) InsecureSkipVerify

func (h *InfluxDBHandler) InsecureSkipVerify(urls []string)

func (*InfluxDBHandler) LinkingSubscriptions

func (h *InfluxDBHandler) LinkingSubscriptions(cluster string)

func (*InfluxDBHandler) StartedUDPListener

func (h *InfluxDBHandler) StartedUDPListener(db string, rp string)

func (*InfluxDBHandler) UnlinkingSubscriptions

func (h *InfluxDBHandler) UnlinkingSubscriptions(cluster string)

func (*InfluxDBHandler) WithClusterContext

func (h *InfluxDBHandler) WithClusterContext(id string) influxdb.Diagnostic

func (*InfluxDBHandler) WithUDPContext

func (h *InfluxDBHandler) WithUDPContext(db string, rp string) udp.Diagnostic

type Int64Field

type Int64Field struct {
	// contains filtered or unexported fields
}

Int64

func (Int64Field) Match

func (s Int64Field) Match(key, value string) bool

func (Int64Field) WriteJSONTo

func (s Int64Field) WriteJSONTo(w Writer) (n int64, err error)

func (Int64Field) WriteLogfmtTo

func (s Int64Field) WriteLogfmtTo(w Writer) (n int64, err error)

type IntField

type IntField struct {
	// contains filtered or unexported fields
}

Int

func (IntField) Match

func (s IntField) Match(key, value string) bool

func (IntField) WriteJSONTo

func (s IntField) WriteJSONTo(w Writer) (n int64, err error)

func (IntField) WriteLogfmtTo

func (s IntField) WriteLogfmtTo(w Writer) (n int64, err error)

type K8sHandler

type K8sHandler struct {
	// contains filtered or unexported fields
}

func (*K8sHandler) WithClusterContext

func (h *K8sHandler) WithClusterContext(cluster string) k8s.Diagnostic

type KapacitorHandler

type KapacitorHandler struct {
	// contains filtered or unexported fields
}

func (*KapacitorHandler) AlertTriggered

func (h *KapacitorHandler) AlertTriggered(level alert.Level, id string, message string, rows *models.Row)

func (*KapacitorHandler) ClosingEdge

func (h *KapacitorHandler) ClosingEdge(collected int64, emitted int64)

func (*KapacitorHandler) Error

func (h *KapacitorHandler) Error(msg string, err error, ctx ...keyvalue.T)

func (*KapacitorHandler) LogBatchData

func (h *KapacitorHandler) LogBatchData(level, prefix string, batch edge.BufferedBatchMessage)

func (*KapacitorHandler) LogPointData

func (h *KapacitorHandler) LogPointData(level, prefix string, point edge.PointMessage)

func (*KapacitorHandler) SettingReplicas

func (h *KapacitorHandler) SettingReplicas(new int, old int, id string)

func (*KapacitorHandler) StartedTask

func (h *KapacitorHandler) StartedTask(task string)

func (*KapacitorHandler) StartingBatchQuery

func (h *KapacitorHandler) StartingBatchQuery(q string)

func (*KapacitorHandler) StartingTask

func (h *KapacitorHandler) StartingTask(task string)

func (*KapacitorHandler) StoppedTask

func (h *KapacitorHandler) StoppedTask(task string)

func (*KapacitorHandler) StoppedTaskWithError

func (h *KapacitorHandler) StoppedTaskWithError(task string, err error)

func (*KapacitorHandler) TaskMasterClosed

func (h *KapacitorHandler) TaskMasterClosed()

func (*KapacitorHandler) TaskMasterDot

func (h *KapacitorHandler) TaskMasterDot(d string)

func (*KapacitorHandler) TaskMasterOpened

func (h *KapacitorHandler) TaskMasterOpened()

func (*KapacitorHandler) UDFLog

func (h *KapacitorHandler) UDFLog(s string)

func (*KapacitorHandler) WithEdgeContext

func (h *KapacitorHandler) WithEdgeContext(task, parent, child string) kapacitor.EdgeDiagnostic

func (*KapacitorHandler) WithNodeContext

func (h *KapacitorHandler) WithNodeContext(node string) kapacitor.NodeDiagnostic

func (*KapacitorHandler) WithTaskContext

func (h *KapacitorHandler) WithTaskContext(task string) kapacitor.TaskDiagnostic

func (*KapacitorHandler) WithTaskMasterContext

func (h *KapacitorHandler) WithTaskMasterContext(tm string) kapacitor.Diagnostic

type Level

type Level int
const (
	DebugLevel Level = iota
	InfoLevel
	ErrorLevel
)

type LoadHandler

type LoadHandler struct {
	// contains filtered or unexported fields
}

func (*LoadHandler) Debug

func (h *LoadHandler) Debug(msg string)

func (*LoadHandler) Error

func (h *LoadHandler) Error(msg string, err error)

func (*LoadHandler) Loading

func (h *LoadHandler) Loading(el string, file string)

type Logger

type Logger interface {
	Error(msg string, ctx ...Field)
	Debug(msg string, ctx ...Field)
	Info(msg string, ctx ...Field)
	With(ctx ...Field) Logger
}

type MQTTHandler

type MQTTHandler struct {
	// contains filtered or unexported fields
}

func (*MQTTHandler) CreatingAlertHandler

func (h *MQTTHandler) CreatingAlertHandler(c mqtt.HandlerConfig)

func (*MQTTHandler) Error

func (h *MQTTHandler) Error(msg string, err error)

func (*MQTTHandler) HandlingEvent

func (h *MQTTHandler) HandlingEvent()

func (*MQTTHandler) WithContext

func (h *MQTTHandler) WithContext(ctx ...keyvalue.T) mqtt.Diagnostic

type MultiLogger

type MultiLogger struct {
	// contains filtered or unexported fields
}

func NewMultiLogger

func NewMultiLogger(loggers ...Logger) *MultiLogger

func (*MultiLogger) Debug

func (l *MultiLogger) Debug(msg string, ctx ...Field)

func (*MultiLogger) Error

func (l *MultiLogger) Error(msg string, ctx ...Field)

func (*MultiLogger) Info

func (l *MultiLogger) Info(msg string, ctx ...Field)

func (*MultiLogger) With

func (l *MultiLogger) With(ctx ...Field) Logger

type NoAuthHandler

type NoAuthHandler struct {
	// contains filtered or unexported fields
}

func (*NoAuthHandler) FakedSubscriptionUserToken

func (h *NoAuthHandler) FakedSubscriptionUserToken()

func (*NoAuthHandler) FakedUserAuthentication

func (h *NoAuthHandler) FakedUserAuthentication(username string)

type OpsGenieHandler

type OpsGenieHandler struct {
	// contains filtered or unexported fields
}

func (*OpsGenieHandler) Error

func (h *OpsGenieHandler) Error(msg string, err error)

func (*OpsGenieHandler) WithContext

func (h *OpsGenieHandler) WithContext(ctx ...keyvalue.T) opsgenie.Diagnostic

type PagerDutyHandler

type PagerDutyHandler struct {
	// contains filtered or unexported fields
}

PagerDuty handler

func (*PagerDutyHandler) Error

func (h *PagerDutyHandler) Error(msg string, err error)

func (*PagerDutyHandler) WithContext

func (h *PagerDutyHandler) WithContext(ctx ...keyvalue.T) pagerduty.Diagnostic

type PushoverHandler

type PushoverHandler struct {
	// contains filtered or unexported fields
}

func (*PushoverHandler) Error

func (h *PushoverHandler) Error(msg string, err error)

func (*PushoverHandler) WithContext

func (h *PushoverHandler) WithContext(ctx ...keyvalue.T) pushover.Diagnostic

type ReplayHandler

type ReplayHandler struct {
	// contains filtered or unexported fields
}

func (*ReplayHandler) Debug

func (h *ReplayHandler) Debug(msg string, ctx ...keyvalue.T)

func (*ReplayHandler) Error

func (h *ReplayHandler) Error(msg string, err error, ctx ...keyvalue.T)

type ReportingHandler

type ReportingHandler struct {
	// contains filtered or unexported fields
}

Reporting handler

func (*ReportingHandler) Error

func (h *ReportingHandler) Error(msg string, err error)

type SMTPHandler

type SMTPHandler struct {
	// contains filtered or unexported fields
}

func (*SMTPHandler) Error

func (h *SMTPHandler) Error(msg string, err error)

func (*SMTPHandler) WithContext

func (h *SMTPHandler) WithContext(ctx ...keyvalue.T) smtp.Diagnostic

type SNMPTrapHandler

type SNMPTrapHandler struct {
	// contains filtered or unexported fields
}

func (*SNMPTrapHandler) Error

func (h *SNMPTrapHandler) Error(msg string, err error)

func (*SNMPTrapHandler) WithContext

func (h *SNMPTrapHandler) WithContext(ctx ...keyvalue.T) snmptrap.Diagnostic

type ScraperHandler

type ScraperHandler struct {
	// contains filtered or unexported fields
}

func (*ScraperHandler) Debug

func (h *ScraperHandler) Debug(ctx ...interface{})

func (*ScraperHandler) Debugf

func (h *ScraperHandler) Debugf(s string, ctx ...interface{})

func (*ScraperHandler) Debugln

func (h *ScraperHandler) Debugln(ctx ...interface{})

func (*ScraperHandler) Error

func (h *ScraperHandler) Error(ctx ...interface{})

func (*ScraperHandler) Errorf

func (h *ScraperHandler) Errorf(s string, ctx ...interface{})

func (*ScraperHandler) Errorln

func (h *ScraperHandler) Errorln(ctx ...interface{})

func (*ScraperHandler) Fatal

func (h *ScraperHandler) Fatal(ctx ...interface{})

func (*ScraperHandler) Fatalf

func (h *ScraperHandler) Fatalf(s string, ctx ...interface{})

func (*ScraperHandler) Fatalln

func (h *ScraperHandler) Fatalln(ctx ...interface{})

func (*ScraperHandler) Info

func (h *ScraperHandler) Info(ctx ...interface{})

func (*ScraperHandler) Infof

func (h *ScraperHandler) Infof(s string, ctx ...interface{})

func (*ScraperHandler) Infoln

func (h *ScraperHandler) Infoln(ctx ...interface{})

func (*ScraperHandler) SetFormat

func (h *ScraperHandler) SetFormat(string) error

func (*ScraperHandler) SetLevel

func (h *ScraperHandler) SetLevel(string) error

func (*ScraperHandler) Warn

func (h *ScraperHandler) Warn(ctx ...interface{})

func (*ScraperHandler) Warnf

func (h *ScraperHandler) Warnf(s string, ctx ...interface{})

func (*ScraperHandler) Warnln

func (h *ScraperHandler) Warnln(ctx ...interface{})

func (*ScraperHandler) With

func (h *ScraperHandler) With(key string, value interface{}) plog.Logger

type SensuHandler

type SensuHandler struct {
	// contains filtered or unexported fields
}

func (*SensuHandler) Error

func (h *SensuHandler) Error(msg string, err error, ctx ...keyvalue.T)

func (*SensuHandler) WithContext

func (h *SensuHandler) WithContext(ctx ...keyvalue.T) sensu.Diagnostic

type ServerHandler

type ServerHandler struct {
	// contains filtered or unexported fields
}

func (*ServerHandler) Debug

func (h *ServerHandler) Debug(msg string, ctx ...keyvalue.T)

func (*ServerHandler) Error

func (h *ServerHandler) Error(msg string, err error, ctx ...keyvalue.T)

func (*ServerHandler) Info

func (h *ServerHandler) Info(msg string, ctx ...keyvalue.T)

type ServerLogger

type ServerLogger struct {
	// contains filtered or unexported fields
}

func NewServerLogger

func NewServerLogger(w io.Writer) *ServerLogger

func (*ServerLogger) Debug

func (l *ServerLogger) Debug(msg string, ctx ...Field)

func (*ServerLogger) Error

func (l *ServerLogger) Error(msg string, ctx ...Field)

func (*ServerLogger) Info

func (l *ServerLogger) Info(msg string, ctx ...Field)

func (*ServerLogger) Log

func (l *ServerLogger) Log(now time.Time, level string, msg string, ctx []Field)

TODO: actually care about errors?

func (*ServerLogger) SetLevelF

func (l *ServerLogger) SetLevelF(f func(Level) bool)

LevelF set on parent applies to self and any future children

func (*ServerLogger) With

func (l *ServerLogger) With(ctx ...Field) Logger

type Service

type Service struct {
	Logger Logger

	SessionService *SessionService
	// contains filtered or unexported fields
}

func NewService

func NewService(c Config, stdout, stderr io.Writer) *Service

func (*Service) Close

func (s *Service) Close() error

func (*Service) NewAlertServiceHandler

func (s *Service) NewAlertServiceHandler() *AlertServiceHandler

func (*Service) NewAlertaHandler

func (s *Service) NewAlertaHandler() *AlertaHandler

func (*Service) NewAzureHandler

func (s *Service) NewAzureHandler() *ScraperHandler

func (*Service) NewCmdHandler

func (s *Service) NewCmdHandler() *CmdHandler

func (*Service) NewConfigOverrideHandler

func (s *Service) NewConfigOverrideHandler() *ConfigOverrideHandler

func (*Service) NewConsulHandler

func (s *Service) NewConsulHandler() *ScraperHandler

func (*Service) NewDNSHandler

func (s *Service) NewDNSHandler() *ScraperHandler

func (*Service) NewDeadmanHandler

func (s *Service) NewDeadmanHandler() *DeadmanHandler

func (*Service) NewEC2Handler

func (s *Service) NewEC2Handler() *EC2Handler

func (*Service) NewFileDiscoveryHandler

func (s *Service) NewFileDiscoveryHandler() *ScraperHandler

func (*Service) NewGCEHandler

func (s *Service) NewGCEHandler() *ScraperHandler

func (*Service) NewHTTPDHandler

func (s *Service) NewHTTPDHandler() *HTTPDHandler

func (*Service) NewHTTPPostHandler

func (s *Service) NewHTTPPostHandler() *HTTPPostHandler

func (*Service) NewHipChatHandler

func (s *Service) NewHipChatHandler() *HipChatHandler

func (*Service) NewInfluxDBHandler

func (s *Service) NewInfluxDBHandler() *InfluxDBHandler

func (*Service) NewK8sHandler

func (s *Service) NewK8sHandler() *K8sHandler

func (*Service) NewKapacitorHandler

func (s *Service) NewKapacitorHandler() *KapacitorHandler

func (*Service) NewLoadHandler

func (s *Service) NewLoadHandler() *LoadHandler

func (*Service) NewMQTTHandler

func (s *Service) NewMQTTHandler() *MQTTHandler

func (*Service) NewMarathonHandler

func (s *Service) NewMarathonHandler() *ScraperHandler

func (*Service) NewNerveHandler

func (s *Service) NewNerveHandler() *ScraperHandler

func (*Service) NewNoAuthHandler

func (s *Service) NewNoAuthHandler() *NoAuthHandler

func (*Service) NewOpsGenieHandler

func (s *Service) NewOpsGenieHandler() *OpsGenieHandler

func (*Service) NewPagerDutyHandler

func (s *Service) NewPagerDutyHandler() *PagerDutyHandler

func (*Service) NewPushoverHandler

func (s *Service) NewPushoverHandler() *PushoverHandler

func (*Service) NewReplayHandler

func (s *Service) NewReplayHandler() *ReplayHandler

func (*Service) NewReportingHandler

func (s *Service) NewReportingHandler() *ReportingHandler

func (*Service) NewSMTPHandler

func (s *Service) NewSMTPHandler() *SMTPHandler

func (*Service) NewSNMPTrapHandler

func (s *Service) NewSNMPTrapHandler() *SNMPTrapHandler

func (*Service) NewScraperHandler

func (s *Service) NewScraperHandler() *ScraperHandler

func (*Service) NewSensuHandler

func (s *Service) NewSensuHandler() *SensuHandler

func (*Service) NewServerHandler

func (s *Service) NewServerHandler() *ServerHandler

func (*Service) NewServersetHandler

func (s *Service) NewServersetHandler() *ScraperHandler

func (*Service) NewSessionHandler

func (s *Service) NewSessionHandler() *SessionHandler

func (*Service) NewSideloadHandler

func (s *Service) NewSideloadHandler() *SideloadHandler

func (*Service) NewSlackHandler

func (s *Service) NewSlackHandler() *SlackHandler

func (*Service) NewStaticDiscoveryHandler

func (s *Service) NewStaticDiscoveryHandler() *ScraperHandler

func (*Service) NewStaticLevelHandler

func (s *Service) NewStaticLevelHandler(level string, service string) (*StaticLevelHandler, error)

func (*Service) NewStatsHandler

func (s *Service) NewStatsHandler() *StatsHandler

func (*Service) NewStorageHandler

func (s *Service) NewStorageHandler() *StorageHandler

func (*Service) NewSwarmHandler

func (s *Service) NewSwarmHandler() *SwarmHandler

func (*Service) NewTalkHandler

func (s *Service) NewTalkHandler() *TalkHandler

func (*Service) NewTaskStoreHandler

func (s *Service) NewTaskStoreHandler() *TaskStoreHandler

func (*Service) NewTelegramHandler

func (s *Service) NewTelegramHandler() *TelegramHandler

func (*Service) NewTritonHandler

func (s *Service) NewTritonHandler() *ScraperHandler

func (*Service) NewUDFServiceHandler

func (s *Service) NewUDFServiceHandler() *UDFServiceHandler

func (*Service) NewUDPHandler

func (s *Service) NewUDPHandler() *UDPHandler

func (*Service) NewVictorOpsHandler

func (s *Service) NewVictorOpsHandler() *VictorOpsHandler

func (*Service) Open

func (s *Service) Open() error

func (*Service) SetLogLevelFromName

func (s *Service) SetLogLevelFromName(lvl string) error

type Session

type Session struct {
	// contains filtered or unexported fields
}

func (*Session) Debug

func (s *Session) Debug(msg string, context, fields []Field)

func (*Session) Error

func (s *Session) Error(msg string, context, fields []Field)

func (*Session) Info

func (s *Session) Info(msg string, context, fields []Field)

func (*Session) Log

func (s *Session) Log(now time.Time, level, msg string, context, fields []Field)

type SessionHandler

type SessionHandler struct {
	// contains filtered or unexported fields
}

func (*SessionHandler) CreatedLogSession

func (h *SessionHandler) CreatedLogSession(id uuid.UUID, contentType string, tags []tag)

func (*SessionHandler) DeletedLogSession

func (h *SessionHandler) DeletedLogSession(id uuid.UUID, contentType string, tags []tag)

type SessionService

type SessionService struct {
	SessionsStore SessionsStore
	HTTPDService  interface {
		AddPreviewRoutes([]httpd.Route) error
		DelRoutes([]httpd.Route)
	}
	// contains filtered or unexported fields
}

func NewSessionService

func NewSessionService() *SessionService

func (*SessionService) Close

func (s *SessionService) Close() error

func (*SessionService) NewLogger

func (s *SessionService) NewLogger() *sessionsLogger

func (*SessionService) Open

func (s *SessionService) Open() error

func (*SessionService) SetDiagnostic

func (s *SessionService) SetDiagnostic(d Diagnostic)

type SessionsStore

type SessionsStore interface {
	Create(w http.ResponseWriter, contentType string, level Level, tags []tag) *Session
	Delete(s *Session) error
	Each(func(*Session))
	SetDiagnostic(Diagnostic)
}

type SideloadHandler

type SideloadHandler struct {
	// contains filtered or unexported fields
}

func (*SideloadHandler) Error

func (h *SideloadHandler) Error(msg string, err error)

func (*SideloadHandler) WithContext

func (h *SideloadHandler) WithContext(ctx ...keyvalue.T) sideload.Diagnostic

type SlackHandler

type SlackHandler struct {
	// contains filtered or unexported fields
}

func (*SlackHandler) Error

func (h *SlackHandler) Error(msg string, err error)

func (*SlackHandler) InsecureSkipVerify

func (h *SlackHandler) InsecureSkipVerify()

func (*SlackHandler) WithContext

func (h *SlackHandler) WithContext(ctx ...keyvalue.T) slack.Diagnostic

type StaticLevelHandler

type StaticLevelHandler struct {
	// contains filtered or unexported fields
}

func (*StaticLevelHandler) Write

func (h *StaticLevelHandler) Write(buf []byte) (int, error)

type StatsHandler

type StatsHandler struct {
	// contains filtered or unexported fields
}

func (*StatsHandler) Error

func (h *StatsHandler) Error(msg string, err error)

type StorageHandler

type StorageHandler struct {
	// contains filtered or unexported fields
}

func (*StorageHandler) Error

func (h *StorageHandler) Error(msg string, err error)

type StringField

type StringField struct {
	// contains filtered or unexported fields
}

String

func (StringField) Match

func (s StringField) Match(key, value string) bool

func (StringField) WriteJSONTo

func (s StringField) WriteJSONTo(w Writer) (n int64, err error)

func (StringField) WriteLogfmtTo

func (s StringField) WriteLogfmtTo(w Writer) (n int64, err error)

type StringerField

type StringerField struct {
	// contains filtered or unexported fields
}

Stringer

func (StringerField) Match

func (s StringerField) Match(key, value string) bool

func (StringerField) WriteJSONTo

func (s StringerField) WriteJSONTo(w Writer) (n int64, err error)

func (StringerField) WriteLogfmtTo

func (s StringerField) WriteLogfmtTo(w Writer) (n int64, err error)

type StringsField

type StringsField struct {
	// contains filtered or unexported fields
}

Strings

func (StringsField) Match

func (s StringsField) Match(key, value string) bool

func (StringsField) WriteJSONTo

func (s StringsField) WriteJSONTo(w Writer) (n int64, err error)

func (StringsField) WriteLogfmtTo

func (s StringsField) WriteLogfmtTo(w Writer) (n int64, err error)

type SwarmHandler

type SwarmHandler struct {
	// contains filtered or unexported fields
}

func (*SwarmHandler) WithClusterContext

func (h *SwarmHandler) WithClusterContext(cluster string) swarm.Diagnostic

type TalkHandler

type TalkHandler struct {
	// contains filtered or unexported fields
}

func (*TalkHandler) Error

func (h *TalkHandler) Error(msg string, err error)

func (*TalkHandler) WithContext

func (h *TalkHandler) WithContext(ctx ...keyvalue.T) talk.Diagnostic

type TaskStoreHandler

type TaskStoreHandler struct {
	// contains filtered or unexported fields
}

func (*TaskStoreHandler) AlreadyMigrated

func (h *TaskStoreHandler) AlreadyMigrated(entity, id string)

func (*TaskStoreHandler) Debug

func (h *TaskStoreHandler) Debug(msg string)

func (*TaskStoreHandler) Error

func (h *TaskStoreHandler) Error(msg string, err error, ctx ...keyvalue.T)

func (*TaskStoreHandler) FinishedTask

func (h *TaskStoreHandler) FinishedTask(taskID string)

func (*TaskStoreHandler) Migrated

func (h *TaskStoreHandler) Migrated(entity, id string)

func (*TaskStoreHandler) StartedTask

func (h *TaskStoreHandler) StartedTask(taskID string)

func (*TaskStoreHandler) StartingTask

func (h *TaskStoreHandler) StartingTask(taskID string)

type TelegramHandler

type TelegramHandler struct {
	// contains filtered or unexported fields
}

func (*TelegramHandler) Error

func (h *TelegramHandler) Error(msg string, err error)

func (*TelegramHandler) WithContext

func (h *TelegramHandler) WithContext(ctx ...keyvalue.T) telegram.Diagnostic

type TimeField

type TimeField struct {
	// contains filtered or unexported fields
}

Time

func (TimeField) Match

func (s TimeField) Match(key, value string) bool

func (TimeField) WriteJSONTo

func (s TimeField) WriteJSONTo(w Writer) (n int64, err error)

func (TimeField) WriteLogfmtTo

func (s TimeField) WriteLogfmtTo(w Writer) (n int64, err error)

type UDFServiceHandler

type UDFServiceHandler struct {
	// contains filtered or unexported fields
}

func (*UDFServiceHandler) Error

func (h *UDFServiceHandler) Error(msg string, err error, ctx ...keyvalue.T)

func (*UDFServiceHandler) LoadedUDFInfo

func (h *UDFServiceHandler) LoadedUDFInfo(udf string)

func (*UDFServiceHandler) UDFLog

func (h *UDFServiceHandler) UDFLog(msg string)

func (*UDFServiceHandler) WithUDFContext

func (h *UDFServiceHandler) WithUDFContext() udf.Diagnostic

type UDPHandler

type UDPHandler struct {
	// contains filtered or unexported fields
}

func (*UDPHandler) ClosedService

func (h *UDPHandler) ClosedService()

func (*UDPHandler) Error

func (h *UDPHandler) Error(msg string, err error, ctx ...keyvalue.T)

func (*UDPHandler) StartedListening

func (h *UDPHandler) StartedListening(addr string)

type VictorOpsHandler

type VictorOpsHandler struct {
	// contains filtered or unexported fields
}

func (*VictorOpsHandler) Error

func (h *VictorOpsHandler) Error(msg string, err error)

func (*VictorOpsHandler) WithContext

func (h *VictorOpsHandler) WithContext(ctx ...keyvalue.T) victorops.Diagnostic

type WriteFlusher

type WriteFlusher interface {
	Write([]byte) (int, error)
	Flush()
}

type Writer

type Writer interface {
	Write([]byte) (int, error)
	WriteByte(byte) error
	WriteString(string) (int, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL