common

package
v0.0.0-...-b8a1a0e Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SUCCESS                         = "SUCCESS"
	FAIL                            = "FAIL"
	INVALID_PARAMETERS              = "INVALID_PARAMETERS"
	RESOURCE_NOT_FOUND              = "RESOURCE_NOT_FOUND"
	RESOURCE_ALREADY_EXIST          = "RESOURCE_ALREADY_EXIST"
	PARAMETER_ILLEGAL               = "PARAMETER_ILLEGAL"
	INVALID_POST_DATA               = "INVALID_POST_DATA"
	SERVER_ERROR                    = "SERVER_ERROR"
	RESOURCE_NUM_EXCEEDED           = "RESOURCE_NUM_EXCEEDED"
	SELECTED_RESOURCES_NUM_EXCEEDED = "SELECTED_RESOURCES_NUM_EXCEEDED"
)
View Source
const (
	TAP_PORT_HOST     = "tap_port_host"
	TAP_PORT_CHOST    = "tap_port_chost"
	TAP_PORT_POD_NODE = "tap_port_pod_node"
)
View Source
const (
	COLUMN_SCHEMA_TYPE_TAG = iota
	COLUMN_SCHEMA_TYPE_METRICS
)

Variables

This section is empty.

Functions

func IsValueInSliceString

func IsValueInSliceString(value string, list []string) bool

func LoadDbDescriptions

func LoadDbDescriptions(dir string) (map[string]interface{}, error)

func NewError

func NewError(status string, message string) error

Types

type ColumnSchema

type ColumnSchema struct {
	Name      string
	Unit      string
	Type      int
	ValueType string
	PreAS     string
	LabelType string
}

func NewColumnSchema

func NewColumnSchema(name, preAS, labelType string) *ColumnSchema

func (*ColumnSchema) ToMap

func (c *ColumnSchema) ToMap() map[string]interface{}

type ColumnSchemas

type ColumnSchemas []*ColumnSchema

func (*ColumnSchemas) ToArray

func (c *ColumnSchemas) ToArray() []interface{}

type EntryValue

type EntryValue struct {
	Filter string
	Time   time.Time
}

type KeyValue

type KeyValue struct {
	Key   string
	Value string
}

type QuerierParams

type QuerierParams struct {
	Debug      string
	QueryUUID  string
	DB         string
	Sql        string
	DataSource string
	Context    context.Context
	NoPreWhere bool
}

type Result

type Result struct {
	Columns []interface{}
	Values  []interface{}
	Schemas ColumnSchemas
}

func (*Result) ToJson

func (r *Result) ToJson() map[string]interface{}

type ServiceError

type ServiceError struct {
	Status  string
	Message string
}

func (*ServiceError) Error

func (e *ServiceError) Error() string

type TempoParams

type TempoParams struct {
	TraceId     string
	StartTime   string
	EndTime     string
	TagName     string
	MinDuration string
	MaxDuration string
	Limit       string
	Debug       string
	Filters     []*KeyValue
	Context     context.Context
}

func (*TempoParams) SetFilters

func (p *TempoParams) SetFilters(filterStr string)

Jump to

Keyboard shortcuts

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