Documentation ¶
Index ¶
Constants ¶
View Source
const ( // We use a single BigTable table for storing logs. BT_TABLE = "task-driver-logs" // We use a single BigTable column family. BT_COLUMN_FAMILY = "LOGS" // We use a single BigTable column which stores gob-encoded log entries. BT_COLUMN = "ENTRY" INSERT_TIMEOUT = 30 * time.Second QUERY_TIMEOUT = 5 * time.Second )
Variables ¶
View Source
var ( // Fully-qualified BigTable column name. BT_COLUMN_FULL = fmt.Sprintf("%s:%s", BT_COLUMN_FAMILY, BT_COLUMN) )
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct { InsertID string `json:"insertId"` Labels map[string]string `json:"labels"` LogName string `json:"logName"` ReceiveTimestamp time.Time `json:"receiveTimestamp"` //Resource Severity string `json:"severity"` JsonPayload *td.Message `json:"jsonPayload"` TextPayload string `json:"textPayload"` Timestamp time.Time `json:"timestamp"` }
Entry mimics logging.Entry, which for some reason does not include the jsonPayload field, and is not parsable via json.Unmarshal due to the Severity type.
type LogsManager ¶
type LogsManager struct {
// contains filtered or unexported fields
}
LogsManager is a struct which provides an interface for inserting and retrieving Task Driver logs in Cloud BigTable.
func NewLogsManager ¶
func NewLogsManager(ctx context.Context, project, instance string, ts oauth2.TokenSource) (*LogsManager, error)
NewLogsManager returns a LogsManager instance.
Click to show internal directories.
Click to hide internal directories.