Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("logaggregator: resource not found")
ErrNotFound is returned when a resource is not found (HTTP status 404).
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
*httpclient.Client
}
func NewWithHTTP ¶
NewClient creates a new Client pointing at uri with the specified http client.
func (*Client) GetCursors ¶
func (c *Client) GetCursors() (map[string]utils.HostCursor, error)
func (*Client) GetLog ¶
GetLog returns a ReadCloser log stream of the log channel with ID channelID. Each line returned will be a JSON serialized Message.
If lines is above zero, the number of lines returned will be capped at that value. Otherwise, all available logs are returned. If follow is true, new log lines are streamed after the buffered log.
func (*Client) GetSnapshot ¶
func (c *Client) GetSnapshot() (io.ReadCloser, error)
type Message ¶
type Message struct { // Hostname is the host that the job was running on when this log message was // emitted. HostID string `json:"host_id,omitempty"` // JobID is the ID of the job that emitted this log message. JobID string `json:"job_id,omitempty"` // Msg is the actual content of this log message. Msg string `json:"msg,omitempty"` // ProcessType is the type of process that emitted this log message. ProcessType string `json:"process_type,omitempty"` // Source is the source of this log message, such as "app" or "router". Source string `json:"source,omitempty"` // Stream is the I/O stream that emitted this message, such as "stdout" or // "stderr". Stream logagg.StreamType `json:"stream,omitempty"` // Timestamp is the time that this log line was emitted. Timestamp time.Time `json:"timestamp,omitempty"` }
Message represents a single log message.
Click to show internal directories.
Click to hide internal directories.