log

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package log implements the Log domain. Provides access to log entries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the Log domain with the connection set to conn.

Types

type Entry

type Entry struct {
	Source           string              `json:"source"`                     // Log entry source.
	Level            string              `json:"level"`                      // Log entry severity.
	Text             string              `json:"text"`                       // Logged text.
	Timestamp        runtime.Timestamp   `json:"timestamp"`                  // Timestamp when this entry was added.
	URL              *string             `json:"url,omitempty"`              // URL of the resource if known.
	LineNumber       *int                `json:"lineNumber,omitempty"`       // Line number in the resource.
	StackTrace       *runtime.StackTrace `json:"stackTrace,omitempty"`       // JavaScript stack trace.
	NetworkRequestID *network.RequestID  `json:"networkRequestId,omitempty"` // Identifier of the network request associated with this entry.
	WorkerID         *string             `json:"workerId,omitempty"`         // Identifier of the worker associated with this entry.
}

Entry Log entry.

type EntryAddedClient

type EntryAddedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*EntryAddedReply, error)
	rpcc.Stream
}

EntryAddedClient is a client for EntryAdded events. Issued when new message was logged.

type EntryAddedReply

type EntryAddedReply struct {
	Entry Entry `json:"entry"` // The entry.
}

EntryAddedReply is the reply for EntryAdded events.

type StartViolationsReportArgs

type StartViolationsReportArgs struct {
	Config []ViolationSetting `json:"config"` // Configuration for violations.
}

StartViolationsReportArgs represents the arguments for StartViolationsReport in the Log domain.

func NewStartViolationsReportArgs

func NewStartViolationsReportArgs(config []ViolationSetting) *StartViolationsReportArgs

NewStartViolationsReportArgs initializes StartViolationsReportArgs with the required arguments.

type ViolationSetting

type ViolationSetting struct {
	Name      string  `json:"name"`      // Violation type.
	Threshold float64 `json:"threshold"` // Time threshold to trigger upon.
}

ViolationSetting Violation configuration setting.

Jump to

Keyboard shortcuts

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