Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultHttpListenerPort = "3000"
DefaultHttpListenerPort is used to set the URL where the logs will be sent by Logs API
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BufferingCfg ¶
type BufferingCfg struct { // MaxItems is the maximum number of events to be buffered in memory. (default: 10000, minimum: 1000, maximum: 10000) MaxItems uint32 `json:"maxItems"` // MaxBytes is the maximum size in bytes of the logs to be buffered in memory. (default: 262144, minimum: 262144, maximum: 1048576) MaxBytes uint32 `json:"maxBytes"` // TimeoutMS is the maximum time (in milliseconds) for a batch to be buffered. (default: 1000, minimum: 100, maximum: 30000) TimeoutMS uint32 `json:"timeoutMs"` }
BufferingCfg is the configuration set for receiving logs from Logs API. Whichever of the conditions below is met first, the logs will be sent
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client has the listener that receives the logs and the logger that handles the received logs
func NewClient ¶
NewClient returns an agent to listen and handle logs coming from Logs API for HTTP Make sure the agent is initialized by calling Init(agentId) before subscription for the Logs API.
type Destination ¶
type Destination struct { Protocol string `json:"protocol"` URI string `json:"URI"` HttpMethod string `json:"method"` Encoding string `json:"encoding"` }
Destination is the configuration for listeners who would like to receive logs with HTTP
type SubscribeRequest ¶
type SubscribeRequest struct { SchemaVersion string `json:"schemaVersion"` EventTypes []EventType `json:"types"` BufferingCfg BufferingCfg `json:"buffering"` Destination Destination `json:"destination"` }
SubscribeRequest is the request body that is sent to Logs API on subscribe
Click to show internal directories.
Click to hide internal directories.