query

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogMetaTableName = "spot_prod.base_log_meta"
)

LogTableName .

Variables

View Source
var ErrEmptyLogMeta = errors.New("empty log meta record")

Functions

This section is empty.

Types

type Log

type Log struct {
	Source     string `json:"source"`
	ID         string `json:"id"`
	Stream     string `json:"stream"`
	TimeBucket string `json:"timeBucket"`
	Timestamp  string `json:"timestamp"`
	Offset     string `json:"offset"`
	Content    string `json:"content"`
	Level      string `json:"level"`
	RequestID  string `json:"requestId"`
}

Log 接口返回的结构

type LogMeta

type LogMeta struct {
	Source string            `json:"source"`
	ID     string            `json:"id"`
	Tags   map[string]string `json:"tags"`
}

type Logs

type Logs []*Log

Logs .

func (Logs) Len

func (l Logs) Len() int

func (Logs) Less

func (l Logs) Less(i, j int) bool

func (Logs) Swap

func (l Logs) Swap(i, j int)

type RequestCtx

type RequestCtx struct {
	RequestID     string `form:"requestId"`
	LogID         string `form:"requestId"`
	Source        string `form:"source"`
	ID            string `form:"id"`
	Stream        string `form:"stream" default:"stdout"`
	Start         int64  `form:"start"`
	End           int64  `form:"end"`
	Count         int64  `form:"count"`
	ApplicationID string `from:"applicationId"`
	ClusterName   string `from:"clusterName"`
}

Request .

type Response

type Response struct {
	Lines []*Log `json:"lines"`
}

Response .

type SaveLogMeta

type SaveLogMeta struct {
	Source string
	ID     string
	Tags   map[string]string
}

type SavedLog

type SavedLog struct {
	Source     string
	ID         string
	Stream     string
	TimeBucket int64 `db:"time_bucket"`
	Timestamp  int64
	Offset     int64
	Content    []byte
	Level      string
	RequestID  string `db:"request_id"`
}

SavedLog Cassandra查询的结构

Jump to

Keyboard shortcuts

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