Documentation
¶
Index ¶
- Constants
- Variables
- type APOCollector
- type AdapterAPIConfig
- type ArmsConfig
- type ClickhouseConfig
- type Cluster
- type ClusterIntegration
- type ClusterIntegrationVO
- type CollectorGatewayPorts
- type ElasticConfig
- type GetCInstallConfigResponse
- type GetCInstallDocResponse
- type GetCInstallRequest
- type HuaweiConfig
- type JSONField
- func (j *JSONField[T]) AcceptExistedSecret(oldV T)
- func (j *JSONField[T]) MarshalJSON() ([]byte, error)
- func (j *JSONField[T]) ReplaceSecret()
- func (j *JSONField[T]) Scan(value interface{}) error
- func (j *JSONField[T]) UnmarshalJSON(data []byte) error
- func (j JSONField[T]) Value() (driver.Value, error)
- type JaegerConfig
- type ListClusterResponse
- type LogAPI
- type LogIntegration
- type LogSelfCollectConfig
- type MetricAPI
- type MetricIntegration
- type Nbs3Config
- type PinpointConfig
- type PrometheusConfig
- type SkywalkingConfig
- type TraceAPI
- type TraceIntegration
- type TraceSelfCollectConfig
- type TriggerAdapterUpdateRequest
- type VictoriaMetricConfig
Constants ¶
View Source
const ( ClusterTypeK8s = "k8s" ClusterTypeVM = "vm" )
View Source
const ( TraceModeSidecar = "trace-sidecar" TraceModeAll = "trace" TraceModeCollector = "collector" MetricModeAll = "metrics" MetricModeCollector = "collector" LogModeAll = "log" LogModeSample = "log-sample" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type APOCollector ¶
type APOCollector struct { CollectorGatewayAddr string `json:"collectorGatewayAddr"` CollectorAddr string `json:"collectorAddr,omitempty"` Ports CollectorGatewayPorts `json:"ports"` }
func (*APOCollector) RemoveHttpPrefix ¶
func (c *APOCollector) RemoveHttpPrefix()
func (*APOCollector) Scan ¶
func (c *APOCollector) Scan(value interface{}) error
实现 Scanner 接口,将 JSON 字符串扫描回 MapStringString
type AdapterAPIConfig ¶
type ArmsConfig ¶
type ClickhouseConfig ¶
type Cluster ¶
type Cluster struct { ID string `form:"id" json:"id" gorm:"primaryKey;type:varchar(100);column:id"` Name string `form:"name" json:"name" gorm:"unique;type:varchar(100);column:name"` ClusterType string `form:"clusterType" json:"clusterType" gorm:"type:varchar(100);column:cluster_type"` APOCollector APOCollector `json:"apoCollector,omitempty" gorm:"type:json;column:apo_collector"` }
type ClusterIntegration ¶
type ClusterIntegration struct { Cluster Trace TraceIntegration `json:"trace"` Metric MetricIntegration `json:"metric"` Log LogIntegration `json:"log"` }
func (*ClusterIntegration) RemoveSecret ¶
func (ci *ClusterIntegration) RemoveSecret() *ClusterIntegration
type ClusterIntegrationVO ¶
type ClusterIntegrationVO struct { *ClusterIntegration ChartVersion string `json:"chartVersion"` DeployVersion string `json:"deployVersion"` }
type CollectorGatewayPorts ¶
type ElasticConfig ¶
type GetCInstallDocResponse ¶
type GetCInstallDocResponse struct {
InstallMD []byte `json:"installMd"`
}
type GetCInstallRequest ¶
type GetCInstallRequest struct {
ClusterID string `json:"clusterId" form:"clusterId"`
}
type HuaweiConfig ¶
type JSONField ¶
type JSONField[T any] struct { Obj T }
func (*JSONField[T]) AcceptExistedSecret ¶
func (j *JSONField[T]) AcceptExistedSecret(oldV T)
func (*JSONField[T]) MarshalJSON ¶
func (*JSONField[T]) ReplaceSecret ¶
func (j *JSONField[T]) ReplaceSecret()
func (*JSONField[T]) UnmarshalJSON ¶
type JaegerConfig ¶
type JaegerConfig struct {
Address string `json:"address" mapstructure:"address"`
}
type ListClusterResponse ¶
type ListClusterResponse struct {
Clusters []Cluster `json:"clusters"`
}
type LogAPI ¶
type LogAPI struct {
Clickhouse *ClickhouseConfig `json:"clickhouse"`
}
type LogIntegration ¶
type LogIntegration struct { ClusterID string `json:"clusterId,omitempty" gorm:"primaryKey;column:cluster_id"` Mode string `json:"mode" gorm:"type:varchar(100);column:mode"` Name string `json:"name" gorm:"type:json;column:name"` DBType string `json:"dbType" gorm:"type:json;column:db_type"` LogAPI *JSONField[LogAPI] `json:"logAPI,omitempty" gorm:"type:json;column:log_api"` LogSelfCollectConfig *JSONField[LogSelfCollectConfig] `json:"selfCollectConfig" gorm:"type:json;column:self_collect_config"` UpdatedAt int64 `json:"-" gorm:"autoUpdateTime:second"` IsDeleted bool `json:"-" gorm:"column:is_deleted;default:false"` }
type LogSelfCollectConfig ¶
type LogSelfCollectConfig struct {
Mode string `json:"mode"` // full,abnormal
}
type MetricAPI ¶
type MetricAPI struct {
VictoriaMetric *VictoriaMetricConfig `json:"victoriametric,omitempty"`
}
type MetricIntegration ¶
type MetricIntegration struct { ClusterID string `json:"clusterId,omitempty" gorm:"primaryKey;column:cluster_id"` Mode string `json:"mode" gorm:"type:varchar(100);column:mode"` Name string `json:"name"` DSType string `json:"dsType"` MetricAPI *JSONField[MetricAPI] `json:"metricAPI" gorm:"type:json;column:metric_api"` UpdatedAt int64 `json:"-" gorm:"autoUpdateTime:second"` IsDeleted bool `json:"-" gorm:"column:is_deleted;default:false"` }
type Nbs3Config ¶
type PinpointConfig ¶
type PinpointConfig struct {
Address string `json:"address" mapstructure:"address"`
}
type PrometheusConfig ¶
type SkywalkingConfig ¶
type TraceAPI ¶
type TraceAPI struct { Skywalking *SkywalkingConfig `json:"skywalking,omitempty" mapstructure:"skywalking"` Jaeger *JaegerConfig `json:"jaeger,omitempty" mapstructure:"jaeger"` Nbs3 *Nbs3Config `json:"nbs3,omitempty" mapstructure:"nbs3"` Arms *ArmsConfig `json:"arms,omitempty" mapstructure:"arms"` Huawei *HuaweiConfig `json:"huawei,omitempty" mapstructure:"huawei"` Elastic *ElasticConfig `json:"elastic,omitempty" mapstructure:"elastic"` Pinpoint *PinpointConfig `json:"pinpoint,omitempty" mapstructure:"pinpoint"` // Second Timeout int64 `json:"timeout"` }
TraceAPI contains config for different APM providers using secret:"true" to hide the secret
type TraceIntegration ¶
type TraceIntegration struct { ClusterID string `json:"clusterId,omitempty" gorm:"primaryKey;column:cluster_id"` Mode string `json:"mode" gorm:"type:varchar(100);column:mode"` ApmType string `json:"apmType" gorm:"type:varchar(100);column:apm_type"` TraceAPI JSONField[TraceAPI] `json:"traceAPI,omitempty" gorm:"type:json;column:trace_api"` SelfCollectConfig JSONField[TraceSelfCollectConfig] `json:"selfCollectConfig" gorm:"type:json;column:self_collect_config"` UpdatedAt int64 `json:"-" gorm:"autoUpdateTime:second"` IsDeleted bool `gorm:"column:is_deleted;default:false"` }
type TraceSelfCollectConfig ¶
type TriggerAdapterUpdateRequest ¶
type TriggerAdapterUpdateRequest struct {
LastUpdateTS int64 `form:"lastUpdateTS" json:"lastUpdateTS"`
}
type VictoriaMetricConfig ¶
type VictoriaMetricConfig PrometheusConfig
Click to show internal directories.
Click to hide internal directories.