ltype

package
v0.0.0-...-8b5d7a1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogSeverity_name = map[int32]string{
	0:   "DEFAULT",
	100: "DEBUG",
	200: "INFO",
	300: "NOTICE",
	400: "WARNING",
	500: "ERROR",
	600: "CRITICAL",
	700: "ALERT",
	800: "EMERGENCY",
}
View Source
var LogSeverity_value = map[string]int32{
	"DEFAULT":   0,
	"DEBUG":     100,
	"INFO":      200,
	"NOTICE":    300,
	"WARNING":   400,
	"ERROR":     500,
	"CRITICAL":  600,
	"ALERT":     700,
	"EMERGENCY": 800,
}

Functions

This section is empty.

Types

type HttpRequest

type HttpRequest struct {
	// The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
	RequestMethod string `protobuf:"bytes,1,opt,name=request_method,json=requestMethod,proto3" json:"request_method,omitempty"`
	// The scheme (http, https), the host name, the path and the query
	// portion of the URL that was requested.
	// Example: `"http://example.com/some/info?color=red"`.
	RequestUrl string `protobuf:"bytes,2,opt,name=request_url,json=requestUrl,proto3" json:"request_url,omitempty"`
	// The size of the HTTP request message in bytes, including the request
	// headers and the request body.
	RequestSize int64 `protobuf:"varint,3,opt,name=request_size,json=requestSize,proto3" json:"request_size,omitempty"`
	// The response code indicating the status of response.
	// Examples: 200, 404.
	Status int32 `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"`
	// The size of the HTTP response message sent back to the client, in bytes,
	// including the response headers and the response body.
	ResponseSize int64 `protobuf:"varint,5,opt,name=response_size,json=responseSize,proto3" json:"response_size,omitempty"`
	// The user agent sent by the client. Example:
	// `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`.
	UserAgent string `protobuf:"bytes,6,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
	// The IP address (IPv4 or IPv6) of the client that issued the HTTP
	// request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
	RemoteIp string `protobuf:"bytes,7,opt,name=remote_ip,json=remoteIp,proto3" json:"remote_ip,omitempty"`
	// The IP address (IPv4 or IPv6) of the origin server that the request was
	// sent to.
	ServerIp string `protobuf:"bytes,13,opt,name=server_ip,json=serverIp,proto3" json:"server_ip,omitempty"`
	// The referer URL of the request, as defined in
	// [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
	Referer string `protobuf:"bytes,8,opt,name=referer,proto3" json:"referer,omitempty"`
	// The request processing latency on the server, from the time the request was
	// received until the response was sent.
	Latency *duration.Duration `protobuf:"bytes,14,opt,name=latency,proto3" json:"latency,omitempty"`
	// Whether or not a cache lookup was attempted.
	CacheLookup bool `protobuf:"varint,11,opt,name=cache_lookup,json=cacheLookup,proto3" json:"cache_lookup,omitempty"`
	// Whether or not an entity was served from cache
	// (with or without validation).
	CacheHit bool `protobuf:"varint,9,opt,name=cache_hit,json=cacheHit,proto3" json:"cache_hit,omitempty"`
	// Whether or not the response was validated with the origin server before
	// being served from cache. This field is only meaningful if `cache_hit` is
	// True.
	CacheValidatedWithOriginServer bool `` /* 159-byte string literal not displayed */
	// The number of HTTP response bytes inserted into cache. Set only when a
	// cache fill was attempted.
	CacheFillBytes int64 `protobuf:"varint,12,opt,name=cache_fill_bytes,json=cacheFillBytes,proto3" json:"cache_fill_bytes,omitempty"`
	// Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
	Protocol             string   `protobuf:"bytes,15,opt,name=protocol,proto3" json:"protocol,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.

func (*HttpRequest) Descriptor

func (*HttpRequest) Descriptor() ([]byte, []int)

func (*HttpRequest) GetCacheFillBytes

func (m *HttpRequest) GetCacheFillBytes() int64

func (*HttpRequest) GetCacheHit

func (m *HttpRequest) GetCacheHit() bool

func (*HttpRequest) GetCacheLookup

func (m *HttpRequest) GetCacheLookup() bool

func (*HttpRequest) GetCacheValidatedWithOriginServer

func (m *HttpRequest) GetCacheValidatedWithOriginServer() bool

func (*HttpRequest) GetLatency

func (m *HttpRequest) GetLatency() *duration.Duration

func (*HttpRequest) GetProtocol

func (m *HttpRequest) GetProtocol() string

func (*HttpRequest) GetReferer

func (m *HttpRequest) GetReferer() string

func (*HttpRequest) GetRemoteIp

func (m *HttpRequest) GetRemoteIp() string

func (*HttpRequest) GetRequestMethod

func (m *HttpRequest) GetRequestMethod() string

func (*HttpRequest) GetRequestSize

func (m *HttpRequest) GetRequestSize() int64

func (*HttpRequest) GetRequestUrl

func (m *HttpRequest) GetRequestUrl() string

func (*HttpRequest) GetResponseSize

func (m *HttpRequest) GetResponseSize() int64

func (*HttpRequest) GetServerIp

func (m *HttpRequest) GetServerIp() string

func (*HttpRequest) GetStatus

func (m *HttpRequest) GetStatus() int32

func (*HttpRequest) GetUserAgent

func (m *HttpRequest) GetUserAgent() string

func (*HttpRequest) ProtoMessage

func (*HttpRequest) ProtoMessage()

func (*HttpRequest) Reset

func (m *HttpRequest) Reset()

func (*HttpRequest) String

func (m *HttpRequest) String() string

func (*HttpRequest) XXX_DiscardUnknown

func (m *HttpRequest) XXX_DiscardUnknown()

func (*HttpRequest) XXX_Marshal

func (m *HttpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HttpRequest) XXX_Merge

func (m *HttpRequest) XXX_Merge(src proto.Message)

func (*HttpRequest) XXX_Size

func (m *HttpRequest) XXX_Size() int

func (*HttpRequest) XXX_Unmarshal

func (m *HttpRequest) XXX_Unmarshal(b []byte) error

type LogSeverity

type LogSeverity int32

The severity of the event described in a log entry, expressed as one of the standard severity levels listed below. For your reference, the levels are assigned the listed numeric values. The effect of using numeric values other than those listed is undefined.

You can filter for log entries by severity. For example, the following filter expression will match log entries with severities `INFO`, `NOTICE`, and `WARNING`:

severity > DEBUG AND severity <= WARNING

If you are writing log entries, you should map other severity encodings to one of these standard levels. For example, you might map all of Java's FINE, FINER, and FINEST levels to `LogSeverity.DEBUG`. You can preserve the original severity level in the log entry payload if you wish.

const (
	// (0) The log entry has no assigned severity level.
	LogSeverity_DEFAULT LogSeverity = 0
	// (100) Debug or trace information.
	LogSeverity_DEBUG LogSeverity = 100
	// (200) Routine information, such as ongoing status or performance.
	LogSeverity_INFO LogSeverity = 200
	// (300) Normal but significant events, such as start up, shut down, or
	// a configuration change.
	LogSeverity_NOTICE LogSeverity = 300
	// (400) Warning events might cause problems.
	LogSeverity_WARNING LogSeverity = 400
	// (500) Error events are likely to cause problems.
	LogSeverity_ERROR LogSeverity = 500
	// (600) Critical events cause more severe problems or outages.
	LogSeverity_CRITICAL LogSeverity = 600
	// (700) A person must take an action immediately.
	LogSeverity_ALERT LogSeverity = 700
	// (800) One or more systems are unusable.
	LogSeverity_EMERGENCY LogSeverity = 800
)

func (LogSeverity) EnumDescriptor

func (LogSeverity) EnumDescriptor() ([]byte, []int)

func (LogSeverity) String

func (x LogSeverity) String() string

Jump to

Keyboard shortcuts

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