Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var OverHeadError = errors.New("hit data is overhead")
Functions ¶
This section is empty.
Types ¶
type CustomLevel ¶
business topology custom level describe.
type MainlineNode ¶
type Node ¶
type Node struct { // mainline topology object Object string `json:"bk_obj_id"` // object's instance id, eg, bk_set_id, bk_module_id... InstanceID int64 `json:"bk_inst_id"` // instance's name, eg: bk_set_name, bk_module_name... InstanceName string `json:"bk_inst_name"` // node's parent id, only used for internal, do not return to user. ParentID int64 `json:"-"` }
type NodePaths ¶
type NodePaths struct { *MainlineNode InstanceName string `json:"bk_inst_name"` // host may have multiple paths Paths [][]Node `json:"bk_paths"` }
NodePaths describes a topology instance's path from itself to the top biz. cause a host may exists in multiple modules, so it's may have several paths.
type SearchNodePathOption ¶
type SearchNodePathOption struct { Business int64 `json:"bk_biz_id"` Nodes []*MainlineNode `json:"bk_nodes"` }
search one of the node's path in the the business topology.
type SearchOption ¶
type SearchOption struct { BusinessID int64 `json:"bk_biz_id"` // if BusinessID is > 0, then BusinessName will be ignored BusinessName string `json:"bk_biz_name"` SetName string `json:"bk_set_name"` ModuleName string `json:"bk_module_name"` Level CustomLevel `json:"bk_level"` }
all the search option is all matched with regexp and ignore case.
func (SearchOption) Validate ¶
func (s SearchOption) Validate() error
type TopologyTree ¶
type TopologyTree struct {
// contains filtered or unexported fields
}
func NewTopologyTree ¶
func NewTopologyTree(client *business.Client) *TopologyTree
func (*TopologyTree) SearchNodePath ¶
func (t *TopologyTree) SearchNodePath(ctx context.Context, opt *SearchNodePathOption) ([]NodePaths, error)
func (*TopologyTree) SearchTopologyTree ¶
func (t *TopologyTree) SearchTopologyTree(opt *SearchOption) ([]*Topology, error)
func (*TopologyTree) SearchWithBusiness ¶
func (t *TopologyTree) SearchWithBusiness(opt *SearchOption) (*Topology, error)
Obviously, we search it from top to bottom.
Click to show internal directories.
Click to hide internal directories.