Documentation ¶
Overview ¶
Package eventlog provides a client which can be used to to collect and send batches of ChromeInfraEvent logs to the eventlog service.
Index ¶
Constants ¶
const ProdEndpoint = "https://play.googleapis.com/log"
ProdEndpoint is the server address for production logs.
const TestEndpoint = "https://jmt17.google.com/log"
TestEndpoint is the server address for test logs.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChromeInfraLogEvent ¶
type ChromeInfraLogEvent struct { // LogEvent is the event to be sent to the server. The LogEvent's SourceExtension // field will be overwritten with the serialized contents of InfraEvent // when the log event is sent to the server. LogEvent *logpb.LogRequestLite_LogEventLite InfraEvent *logpb.ChromeInfraEvent }
ChromeInfraLogEvent stores a pending LogEvent, and the proto used to populate its SourceExtension field.
type Client ¶
type Client struct { // EventSource identifies the log producer. It may be configured before sending logs. EventSource *logpb.InfraEventSource // contains filtered or unexported fields }
Client may be used to send ChromeInfraEvent logs to the eventlog service.
func NewClient ¶
func NewClient(ctx context.Context, serverAddr string, opts ...ClientOption) *Client
NewClient constructs a Client which can be used to send ChromeInfraEvent logs to the eventlog service. Users must call Close when the Client is no longer needed. ctx is the context to use for batch log uploads.
func (*Client) Close ¶
func (c *Client) Close()
Close flushes any pending logs and releases any resources held by the client. Close should be called when the client is no longer needed.
func (*Client) Log ¶
func (c *Client) Log(events ...*ChromeInfraLogEvent) error
Log stages events to be logged to the eventlog service. Use NewLogEvent to assist with constructing a well-formed log event. Log returns immediately, and batches of events will be sent to the eventlog server periodically. Log takes ownership of events.
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
A ClientOption is an optional argument to NewClient.
func WithHTTPClient ¶
func WithHTTPClient(client *http.Client) ClientOption
WithHTTPClient returns a ClientOption that specifies the HTTP client to use as the basis of communications.
type TypedTime ¶
type TypedTime struct { // The time at which an event occurred. Must have been obtained from Time.Now. Time time.Time Kind logpb.ChromeInfraEvent_TimestampKind }
TypedTime is a time, accompanied by an indication of what the time represents.
func Begin ¶
func Begin() TypedTime
Begin returns the current time for use when logging the beginning of an event.
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
logservice
Package logservice provides loggers which can be used to to collect and send batches of logs to the eventlog service.
|
Package logservice provides loggers which can be used to to collect and send batches of logs to the eventlog service. |
Package eventlog is a generated protocol buffer package.
|
Package eventlog is a generated protocol buffer package. |