Documentation
¶
Index ¶
- Constants
- func GetBody(ctx context.Context, r *http.Request) ([]byte, error)
- func HandleFirehoseLog(w http.ResponseWriter, r *http.Request)
- func HandleJSONLog(w http.ResponseWriter, r *http.Request)
- func HandlePinoLogs(w http.ResponseWriter, r *http.Request, lgJson []byte, logs *hlog.PinoLogs)
- func HandleRawLog(w http.ResponseWriter, r *http.Request)
- func Listen(r *chi.Mux, t trace.Tracer)
- type CloudFrontJsonPayload
- func (p *CloudFrontJsonPayload) GetLevel() string
- func (p *CloudFrontJsonPayload) GetMessage() string
- func (p *CloudFrontJsonPayload) GetMessages() []PayloadMessage
- func (p *CloudFrontJsonPayload) GetTimestamp() *time.Time
- func (p *CloudFrontJsonPayload) Parse(msg []byte) bool
- func (p *CloudFrontJsonPayload) SetLogAttributes(ctx context.Context, hl *hlog.Log, msg []byte) context.Context
- type CloudWatchPayload
- type CloudWatchPayloadMessage
- type FireLensFluentBitPayload
- func (p *FireLensFluentBitPayload) GetLevel() string
- func (p *FireLensFluentBitPayload) GetMessage() string
- func (p *FireLensFluentBitPayload) GetMessages() []PayloadMessage
- func (p *FireLensFluentBitPayload) GetTimestamp() *time.Time
- func (p *FireLensFluentBitPayload) Parse(msg []byte) bool
- func (p *FireLensFluentBitPayload) SetLogAttributes(ctx context.Context, hl *hlog.Log, msg []byte) context.Context
- type FireLensPayload
- func (p *FireLensPayload) GetLevel() string
- func (p *FireLensPayload) GetMessage() string
- func (p *FireLensPayload) GetMessages() []PayloadMessage
- func (p *FireLensPayload) GetTimestamp() *time.Time
- func (p *FireLensPayload) Parse(msg []byte) bool
- func (p *FireLensPayload) SetLogAttributes(ctx context.Context, hl *hlog.Log, msg []byte) context.Context
- type FireLensPinoPayload
- func (p *FireLensPinoPayload) GetLevel() string
- func (p *FireLensPinoPayload) GetMessage() string
- func (p *FireLensPinoPayload) GetMessages() []PayloadMessage
- func (p *FireLensPinoPayload) GetTimestamp() *time.Time
- func (p *FireLensPinoPayload) Parse(msg []byte) bool
- func (p *FireLensPinoPayload) SetLogAttributes(ctx context.Context, hl *hlog.Log, msg []byte) context.Context
- type FirehosePayload
- type JsonPayload
- func (p *JsonPayload) GetLevel() string
- func (p *JsonPayload) GetMessage() string
- func (p *JsonPayload) GetMessages() []PayloadMessage
- func (p *JsonPayload) GetTimestamp() *time.Time
- func (p *JsonPayload) Parse(msg []byte) bool
- func (p *JsonPayload) SetLogAttributes(ctx context.Context, hl *hlog.Log, _ []byte) context.Context
- type Payload
- type PayloadMessage
Constants ¶
View Source
const ( LogDrainProjectQueryParam = "project" LogDrainServiceQueryParam = "service" LogDrainProjectHeader = "x-highlight-project" LogDrainServiceHeader = "x-highlight-service" )
Variables ¶
This section is empty.
Functions ¶
func HandleFirehoseLog ¶
func HandleFirehoseLog(w http.ResponseWriter, r *http.Request)
func HandleJSONLog ¶
func HandleJSONLog(w http.ResponseWriter, r *http.Request)
func HandlePinoLogs ¶
func HandleRawLog ¶
func HandleRawLog(w http.ResponseWriter, r *http.Request)
Types ¶
type CloudFrontJsonPayload ¶
type CloudFrontJsonPayload struct { Date string `json:"date"` Time string `json:"time"` Timestamp string `json:"timestamp"` TimestampMs string `json:"timestamp(ms)"` ScStatus string `json:"sc-status"` CsMethod string `json:"cs-method"` CsHost string `json:"cs(Host)"` CsUriStem string `json:"cs-uri-stem"` CsUriQuery string `json:"cs-uri-query"` }
func (*CloudFrontJsonPayload) GetLevel ¶
func (p *CloudFrontJsonPayload) GetLevel() string
func (*CloudFrontJsonPayload) GetMessage ¶
func (p *CloudFrontJsonPayload) GetMessage() string
func (*CloudFrontJsonPayload) GetMessages ¶
func (p *CloudFrontJsonPayload) GetMessages() []PayloadMessage
func (*CloudFrontJsonPayload) GetTimestamp ¶
func (p *CloudFrontJsonPayload) GetTimestamp() *time.Time
func (*CloudFrontJsonPayload) Parse ¶
func (p *CloudFrontJsonPayload) Parse(msg []byte) bool
func (*CloudFrontJsonPayload) SetLogAttributes ¶
type CloudWatchPayload ¶
type CloudWatchPayload struct { MessageType string Owner string LogGroup string LogStream string SubscriptionFilters []string LogEvents []CloudWatchPayloadMessage }
func (*CloudWatchPayload) GetMessages ¶
func (p *CloudWatchPayload) GetMessages() []PayloadMessage
func (*CloudWatchPayload) Parse ¶
func (p *CloudWatchPayload) Parse(msg []byte) bool
type CloudWatchPayloadMessage ¶
type CloudWatchPayloadMessage struct { Payload *CloudWatchPayload `json:",omitempty"` Id string Timestamp int64 Message string }
func (*CloudWatchPayloadMessage) GetLevel ¶
func (p *CloudWatchPayloadMessage) GetLevel() string
func (*CloudWatchPayloadMessage) GetMessage ¶
func (p *CloudWatchPayloadMessage) GetMessage() string
func (*CloudWatchPayloadMessage) GetTimestamp ¶
func (p *CloudWatchPayloadMessage) GetTimestamp() *time.Time
func (*CloudWatchPayloadMessage) SetLogAttributes ¶
type FireLensFluentBitPayload ¶
type FireLensFluentBitPayload struct { Message string Level string Source string Timestamp string `json:"@timestamp"` }
func (*FireLensFluentBitPayload) GetLevel ¶
func (p *FireLensFluentBitPayload) GetLevel() string
func (*FireLensFluentBitPayload) GetMessage ¶
func (p *FireLensFluentBitPayload) GetMessage() string
func (*FireLensFluentBitPayload) GetMessages ¶
func (p *FireLensFluentBitPayload) GetMessages() []PayloadMessage
func (*FireLensFluentBitPayload) GetTimestamp ¶
func (p *FireLensFluentBitPayload) GetTimestamp() *time.Time
func (*FireLensFluentBitPayload) Parse ¶
func (p *FireLensFluentBitPayload) Parse(msg []byte) bool
func (*FireLensFluentBitPayload) SetLogAttributes ¶
type FireLensPayload ¶
func (*FireLensPayload) GetLevel ¶
func (p *FireLensPayload) GetLevel() string
func (*FireLensPayload) GetMessage ¶
func (p *FireLensPayload) GetMessage() string
func (*FireLensPayload) GetMessages ¶
func (p *FireLensPayload) GetMessages() []PayloadMessage
func (*FireLensPayload) GetTimestamp ¶
func (p *FireLensPayload) GetTimestamp() *time.Time
func (*FireLensPayload) Parse ¶
func (p *FireLensPayload) Parse(msg []byte) bool
func (*FireLensPayload) SetLogAttributes ¶
type FireLensPinoPayload ¶
type FireLensPinoPayload struct { Message string `json:"msg"` Level uint8 `json:"level"` Service string `json:"name"` Time int64 `json:"time"` }
func (*FireLensPinoPayload) GetLevel ¶
func (p *FireLensPinoPayload) GetLevel() string
func (*FireLensPinoPayload) GetMessage ¶
func (p *FireLensPinoPayload) GetMessage() string
func (*FireLensPinoPayload) GetMessages ¶
func (p *FireLensPinoPayload) GetMessages() []PayloadMessage
func (*FireLensPinoPayload) GetTimestamp ¶
func (p *FireLensPinoPayload) GetTimestamp() *time.Time
func (*FireLensPinoPayload) Parse ¶
func (p *FireLensPinoPayload) Parse(msg []byte) bool
func (*FireLensPinoPayload) SetLogAttributes ¶
type FirehosePayload ¶
func ExtractFirehoseMetadata ¶
type JsonPayload ¶
func (*JsonPayload) GetLevel ¶
func (p *JsonPayload) GetLevel() string
func (*JsonPayload) GetMessage ¶
func (p *JsonPayload) GetMessage() string
func (*JsonPayload) GetMessages ¶
func (p *JsonPayload) GetMessages() []PayloadMessage
func (*JsonPayload) GetTimestamp ¶
func (p *JsonPayload) GetTimestamp() *time.Time
func (*JsonPayload) Parse ¶
func (p *JsonPayload) Parse(msg []byte) bool
func (*JsonPayload) SetLogAttributes ¶
type Payload ¶
type Payload interface { Parse([]byte) bool GetMessages() []PayloadMessage }
Click to show internal directories.
Click to hide internal directories.