loki

package
v1.3.2-beta Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data[T any] struct {
	ResultType string `json:"resultType"`
	Result     []*T   `json:"result"`
}

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

func NewDriver

func NewDriver(config string) (*Driver, map[string]interface{}, error)

func (*Driver) LogCount

func (d *Driver) LogCount(clusterId string, conditions map[string]string, spendHour int64, group string) (map[string]int64, error)

func (*Driver) LogInfo

func (d *Driver) LogInfo(clusterId string, id string) (*log_driver.LogInfo, error)

func (*Driver) Logs

func (d *Driver) Logs(clusterId string, conditions map[string]string, start time.Time, end time.Time, limit int64, offset int64) ([]*log_driver.Log, int64, error)

type DriverConfig

type DriverConfig struct {
	URL    string   `json:"url"`
	Header []*Param `json:"headers"`
}

func (*DriverConfig) Check

func (d *DriverConfig) Check() error

type LogCount

type LogCount struct {
	Metric map[string]string `json:"metric"`
	Value  []interface{}     `json:"value"`
}

type LogDetail

type LogDetail struct {
	Api               string `json:"api"`
	Application       string `json:"application"`
	Strategy          string `json:"strategy"`
	ContentType       string `json:"content_type"`
	Cluster           string `json:"cluster"`
	Msec              string `json:"msec"`
	Node              string `json:"node"`
	RequestId         string `json:"request_id"`
	RequestMethod     string `json:"request_method"`
	RequestScheme     string `json:"request_scheme"`
	RequestTime       string `json:"request_time"`
	RequestUri        string `json:"request_uri"`
	RequestBody       string `json:"request_body"`
	ProxyBody         string `json:"proxy_body"`
	ResponseBody      string `json:"response_body"`
	ProxyResponseBody string `json:"proxy_response_body"`
	Service           string `json:"service"`
	Provider          string `json:"provider"`
	Authorization     string `json:"authorization"`
	SrcIp             string `json:"src_ip"`
	Status            string `json:"status"`
}

type LogInfo

type LogInfo struct {
	Stream *LogDetail `json:"stream"`
}

type Param

type Param struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Response

type Response[T any] struct {
	Data   *Data[T] `json:"data"`
	Status string   `json:"status"`
}

Jump to

Keyboard shortcuts

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