data_access

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DELIVERY_ENV_PROD  = "prod"
	DELIVERY_ENV_INFRA = "infra"
	PodResource        = "Pod"
	NodeResource       = "Node"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditInterface

type AuditInterface interface {
	QueryAuditWithAuditId(data interface{}, auditid string) error
	QueryEventPodsWithPodUid(data interface{}, uid string) error
	QueryEventNodeWithPodUid(data interface{}, uid string) error
	QueryEventWithTimeRange(data interface{}, from, to time.Time) error
}

type NodeInterface

type NodeInterface interface {
	QueryNodeYamlsWithNodeUid(data interface{}, uid string) error
	QueryNodeYamlsWithNodeName(data interface{}, name string) error
	QueryNodeYamlsWithNodeIP(data interface{}, ip string) error
	QueryNodeYamlWithParams(data interface{}, opts *model.NodeParams) error
	QueryNodeUIDListWithNodeIp(data interface{}, ip string) error
}

type NodePhaseInterface

type NodePhaseInterface interface {
	QueryNodephaseWithNodeName(data interface{}, name string) error
	QueryNodephaseWithNodeUID(data interface{}, uid string) error
}

type PodInfoInterface

type PodInfoInterface interface {
	QueryPodInfoWithPodUid(data interface{}, uid string) error
}

type PodInterface

type PodInterface interface {
	QueryPodYamlsWithPodUID(data interface{}, uid string) error
	QueryPodYamlsWithPodName(data interface{}, name string) error
	QueryPodYamlsWithHostName(data interface{}, hostname string) error
	QueryPodYamlsWithPodIp(data interface{}, ip string) error
	QueryPodYamlsWithNodeIP(data interface{}, ip string) error
	QueryPodListWithNodeip(data interface{}, nodeIp string, isDeleted bool) error
	QueryPodUIDListByHostname(data interface{}, hostname string) error
	QueryPodUIDListByPodIP(data interface{}, ip string) error
	QueryPodUIDListByPodName(data interface{}, podname string) error
	QueryPodYamlWithParams(data interface{}, opts *model.PodParams) error
}

type PodLifePhaseInterface

type PodLifePhaseInterface interface {
	QueryLifePhaseWithPodUid(data interface{}, uid string) error
	QueryPodLifePhaseByID(data interface{}, uid string) error
}

type SloTraceDataInterface

type SloTraceDataInterface interface {
	QuerySloTraceDataWithPodUID(data interface{}, uid string) error
	QueryDeleteSloWithResult(data interface{}, opts *model.SloOptions) error
	QueryUpgradeSloWithResult(data interface{}, opts *model.SloOptions) error
	QueryCreateSloWithResult(data interface{}, opts *model.SloOptions) error
}

type SpanInterface

type SpanInterface interface {
	QuerySpanWithPodUid(data interface{}, uid string) error
}

type StorageEsImpl

type StorageEsImpl struct {
	DB *elastic.Client
}

2. 定义一个 StorageSqlImpl struct, 该struct 包含了存储client

func (*StorageEsImpl) QueryAuditWithAuditId

func (s *StorageEsImpl) QueryAuditWithAuditId(data interface{}, auditid string) error

func (*StorageEsImpl) QueryCreateSloWithResult

func (s *StorageEsImpl) QueryCreateSloWithResult(data interface{}, requestParams *model.SloOptions) error

func (*StorageEsImpl) QueryDeleteSloWithResult

func (s *StorageEsImpl) QueryDeleteSloWithResult(data interface{}, requestParams *model.SloOptions) error

func (*StorageEsImpl) QueryEventNodeWithPodUid

func (s *StorageEsImpl) QueryEventNodeWithPodUid(data interface{}, PodUid string) error

func (*StorageEsImpl) QueryEventPodsWithPodUid

func (s *StorageEsImpl) QueryEventPodsWithPodUid(data interface{}, PodUid string) error

func (*StorageEsImpl) QueryEventWithTimeRange

func (s *StorageEsImpl) QueryEventWithTimeRange(data interface{}, from, to time.Time) error

func (*StorageEsImpl) QueryLifePhaseWithPodUid

func (s *StorageEsImpl) QueryLifePhaseWithPodUid(data interface{}, uid string) error

func (*StorageEsImpl) QueryNodeUIDListWithNodeIp

func (s *StorageEsImpl) QueryNodeUIDListWithNodeIp(data interface{}, nodeIp string) error

func (*StorageEsImpl) QueryNodeYamlWithParams

func (s *StorageEsImpl) QueryNodeYamlWithParams(data interface{}, debugparams *model.NodeParams) error

func (*StorageEsImpl) QueryNodeYamlsWithNodeIP

func (s *StorageEsImpl) QueryNodeYamlsWithNodeIP(data interface{}, nodeIp string) error

func (*StorageEsImpl) QueryNodeYamlsWithNodeName

func (s *StorageEsImpl) QueryNodeYamlsWithNodeName(data interface{}, nodeName string) error

func (*StorageEsImpl) QueryNodeYamlsWithNodeUid

func (s *StorageEsImpl) QueryNodeYamlsWithNodeUid(data interface{}, nodeUid string) error

func (*StorageEsImpl) QueryNodephaseWithNodeName

func (s *StorageEsImpl) QueryNodephaseWithNodeName(data interface{}, nodeName string) error

func (*StorageEsImpl) QueryNodephaseWithNodeUID

func (s *StorageEsImpl) QueryNodephaseWithNodeUID(data interface{}, nodeUid string) error

func (*StorageEsImpl) QueryPodInfoWithPodUid

func (s *StorageEsImpl) QueryPodInfoWithPodUid(data interface{}, podUid string) error

func (*StorageEsImpl) QueryPodLifePhaseByID added in v0.1.6

func (s *StorageEsImpl) QueryPodLifePhaseByID(data interface{}, uid string) error

func (*StorageEsImpl) QueryPodListWithNodeip

func (s *StorageEsImpl) QueryPodListWithNodeip(data interface{}, nodeIp string, isDeleted bool) error

func (*StorageEsImpl) QueryPodUIDListByHostname

func (s *StorageEsImpl) QueryPodUIDListByHostname(data interface{}, hostName string) error

func (*StorageEsImpl) QueryPodUIDListByPodIP

func (s *StorageEsImpl) QueryPodUIDListByPodIP(data interface{}, podIp string) error

func (*StorageEsImpl) QueryPodUIDListByPodName

func (s *StorageEsImpl) QueryPodUIDListByPodName(data interface{}, podName string) error

func (*StorageEsImpl) QueryPodYamlWithParams

func (s *StorageEsImpl) QueryPodYamlWithParams(data interface{}, params *model.PodParams) error

func (*StorageEsImpl) QueryPodYamlsWithHostName

func (s *StorageEsImpl) QueryPodYamlsWithHostName(data interface{}, hostName string) error

func (*StorageEsImpl) QueryPodYamlsWithNodeIP

func (s *StorageEsImpl) QueryPodYamlsWithNodeIP(data interface{}, nodeIp string) error

func (*StorageEsImpl) QueryPodYamlsWithPodIp

func (s *StorageEsImpl) QueryPodYamlsWithPodIp(data interface{}, podIp string) error

func (*StorageEsImpl) QueryPodYamlsWithPodName

func (s *StorageEsImpl) QueryPodYamlsWithPodName(data interface{}, podName string) error

func (*StorageEsImpl) QueryPodYamlsWithPodUID

func (s *StorageEsImpl) QueryPodYamlsWithPodUID(data interface{}, uid string) error

func (*StorageEsImpl) QueryResourceYamlWithName

func (s *StorageEsImpl) QueryResourceYamlWithName(kind, name string) (interface{}, error)

func (*StorageEsImpl) QueryResourceYamlWithUID

func (s *StorageEsImpl) QueryResourceYamlWithUID(kind, uid string) (interface{}, error)

func (*StorageEsImpl) QuerySloTraceDataWithPodUID

func (s *StorageEsImpl) QuerySloTraceDataWithPodUID(data interface{}, podUid string) error

func (*StorageEsImpl) QuerySpanWithPodUid

func (s *StorageEsImpl) QuerySpanWithPodUid(data interface{}, uid string) error

func (s *StorageEsImpl) QuerySpanWithPodUid(data model.DataModelInterface, uid string) error {

func (*StorageEsImpl) QueryUpgradeSloWithResult

func (s *StorageEsImpl) QueryUpgradeSloWithResult(data interface{}, requestParams *model.SloOptions) error

type StorageInterface

var (
	EsClient *elastic.Client
	XSearch  StorageInterface
)

func NewDBClient

func NewDBClient(opts *common.DBOptions) (StorageInterface, error)

func ProvideEsStorage

func ProvideEsStorage(conf *common.ESOptions) (StorageInterface, error)

4. 提供一个 ProvideSqlStorate 方法, 传入一个 MysqlOptions, 返回一个 StorageInterface 和 error

func ProvideSqlStorate

func ProvideSqlStorate(conf *common.MysqlOptions) (StorageInterface, error)

4. 提供一个 ProvideSqlStorate 方法, 传入一个 MysqlOptions, 返回一个 StorageInterface 和 error

type StorageSqlImpl

type StorageSqlImpl struct {
	DB *gorm.DB
}

2. 定义一个 StorageSqlImpl struct, 该struct 包含了存储client

func (*StorageSqlImpl) QueryAuditWithAuditId

func (s *StorageSqlImpl) QueryAuditWithAuditId(data interface{}, auditid string) error

func (*StorageSqlImpl) QueryCreateSloWithResult

func (s *StorageSqlImpl) QueryCreateSloWithResult(data interface{}, requestParams *model.SloOptions) error

func (*StorageSqlImpl) QueryDeleteSloWithResult

func (s *StorageSqlImpl) QueryDeleteSloWithResult(data interface{}, requestParams *model.SloOptions) error

func (*StorageSqlImpl) QueryEventNodeWithPodUid

func (s *StorageSqlImpl) QueryEventNodeWithPodUid(data interface{}, auditid string) error

func (*StorageSqlImpl) QueryEventPodsWithPodUid

func (s *StorageSqlImpl) QueryEventPodsWithPodUid(data interface{}, auditid string) error

func (*StorageSqlImpl) QueryEventWithTimeRange

func (s *StorageSqlImpl) QueryEventWithTimeRange(data interface{}, from, to time.Time) error

func (*StorageSqlImpl) QueryLifePhaseWithPodUid

func (s *StorageSqlImpl) QueryLifePhaseWithPodUid(data interface{}, podUID string) error

func (*StorageSqlImpl) QueryNodeUIDListWithNodeIp

func (s *StorageSqlImpl) QueryNodeUIDListWithNodeIp(data interface{}, nodeIp string) error

func (*StorageSqlImpl) QueryNodeYamlWithParams

func (s *StorageSqlImpl) QueryNodeYamlWithParams(data interface{}, debugparams *model.NodeParams) error

func (*StorageSqlImpl) QueryNodeYamlsWithNodeIP

func (s *StorageSqlImpl) QueryNodeYamlsWithNodeIP(data interface{}, nodeIp string) error

func (*StorageSqlImpl) QueryNodeYamlsWithNodeName

func (s *StorageSqlImpl) QueryNodeYamlsWithNodeName(data interface{}, nodeName string) error

func (*StorageSqlImpl) QueryNodeYamlsWithNodeUid

func (s *StorageSqlImpl) QueryNodeYamlsWithNodeUid(data interface{}, nodeUid string) error

func (*StorageSqlImpl) QueryNodephaseWithNodeName

func (s *StorageSqlImpl) QueryNodephaseWithNodeName(data interface{}, nodeName string) error

func (*StorageSqlImpl) QueryNodephaseWithNodeUID

func (s *StorageSqlImpl) QueryNodephaseWithNodeUID(data interface{}, nodeUid string) error

func (*StorageSqlImpl) QueryPodInfoWithPodUid

func (s *StorageSqlImpl) QueryPodInfoWithPodUid(data interface{}, podUid string) error

func (*StorageSqlImpl) QueryPodLifePhaseByID added in v0.1.6

func (s *StorageSqlImpl) QueryPodLifePhaseByID(data interface{}, uid string) error

func (*StorageSqlImpl) QueryPodListWithNodeip

func (s *StorageSqlImpl) QueryPodListWithNodeip(data interface{}, nodeIp string, isDeleted bool) error

func (*StorageSqlImpl) QueryPodUIDListByHostname

func (s *StorageSqlImpl) QueryPodUIDListByHostname(data interface{}, hostName string) error

func (*StorageSqlImpl) QueryPodUIDListByPodIP

func (s *StorageSqlImpl) QueryPodUIDListByPodIP(data interface{}, podIp string) error

func (*StorageSqlImpl) QueryPodUIDListByPodName

func (s *StorageSqlImpl) QueryPodUIDListByPodName(data interface{}, podName string) error

func (*StorageSqlImpl) QueryPodYamlWithParams

func (s *StorageSqlImpl) QueryPodYamlWithParams(data interface{}, debugparams *model.PodParams) error

func (*StorageSqlImpl) QueryPodYamlsWithHostName

func (s *StorageSqlImpl) QueryPodYamlsWithHostName(data interface{}, hostName string) error

func (*StorageSqlImpl) QueryPodYamlsWithNodeIP

func (s *StorageSqlImpl) QueryPodYamlsWithNodeIP(data interface{}, nodeIp string) error

func (*StorageSqlImpl) QueryPodYamlsWithPodIp

func (s *StorageSqlImpl) QueryPodYamlsWithPodIp(data interface{}, podIp string) error

func (*StorageSqlImpl) QueryPodYamlsWithPodName

func (s *StorageSqlImpl) QueryPodYamlsWithPodName(data interface{}, podName string) error

func (*StorageSqlImpl) QueryPodYamlsWithPodUID

func (s *StorageSqlImpl) QueryPodYamlsWithPodUID(data interface{}, podUID string) error

func (*StorageSqlImpl) QuerySloTraceDataWithPodUID

func (s *StorageSqlImpl) QuerySloTraceDataWithPodUID(data interface{}, podUid string) error

func (*StorageSqlImpl) QuerySpanWithPodUid

func (s *StorageSqlImpl) QuerySpanWithPodUid(data interface{}, uid string) error

func (*StorageSqlImpl) QueryUpgradeSloWithResult

func (s *StorageSqlImpl) QueryUpgradeSloWithResult(data interface{}, requestParams *model.SloOptions) error

Jump to

Keyboard shortcuts

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