cmdb

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CMDBService

type CMDBService interface {
	// 获取标签列表
	GetLabelNames() []string

	// 获取实体类型集合 (IP/APP/Service...)
	GetEntityTypes() []string

	// 获取标签详情
	GetLabel(labelName string) Label

	// 获取实体标签值
	GetLabelValue(entityName string, entityType string, labelName string) string

	// 获取实体所有标签值
	GetLabelValues(entityName string, entityType string) map[string]string

	// 获取所有实体
	GetAllEntities() map[string]map[string]Entity

	// 获取指定时间戳开始的事件
	GetEntityEvents(timestamp int64) []EntityEvent

	// 获取指定实体
	GetEntity(entityName string, entityType string) Entity
}

type Entity

type Entity struct {
	Name   string
	Type   string
	Labels map[string]string
}

实体类型

type EntityEvent

type EntityEvent struct {
	Type       EntityEventType
	EntityName string
	EntityType string
}

实体事件

type EntityEventType

type EntityEventType int32

实体事件类型

const (
	ENTITY_ADD    EntityEventType = 1
	ENTITY_UPDATE EntityEventType = 2
	ENTITY_REMOVE EntityEventType = 3
)

type Label

type Label struct {
	Name        string
	Values      []string
	Description string
}

标签

Jump to

Keyboard shortcuts

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