Documentation
¶
Index ¶
- Constants
- type Attr
- type Cache
- type DataCollection
- type DetailResult
- type Discover
- func (d *Discover) CreateModelAttrKey(model Model, ownerID string) string
- func (d *Discover) CreateModelKey(model Model, ownerID string) string
- func (d *Discover) GetAttrs(ownerID, objID, modelAttrKey string, attrs map[string]metadata.ObjAttDes) ([]metadata.Attribute, error)
- func (d *Discover) GetInst(ownerID, objID string, keys []string, instKey string) (map[string]interface{}, error)
- func (d *Discover) GetInstFromRedis(instKey string) (map[string]interface{}, error)
- func (d *Discover) GetModel(model Model, ownerID string) (bool, error)
- func (d *Discover) GetModelAttrsFromRedis(modelAttrKey string) ([]string, error)
- func (d *Discover) GetModelFromRedis(modelKey string) (MapData, error)
- func (d *Discover) Run()
- func (d *Discover) Start()
- func (d *Discover) TryCreateModel(msg string) error
- func (d *Discover) TrySetRedis(key string, value []byte, duration time.Duration)
- func (d *Discover) TryUnsetRedis(key string)
- func (d *Discover) UpdateOrAppendAttrs(msg string) error
- func (d *Discover) UpdateOrCreateInst(msg string) error
- type HostCache
- type HostInst
- type HostSnap
- type ListResult
- type M
- type MapData
- type Model
- type Related
- type Result
- type ResultBase
- type SingleRelated
Constants ¶
View Source
const ( RedisDisKeyPrefix = common.BKCacheKeyV3Prefix + "discover:" MasterProcLockKey = common.BKCacheKeyV3Prefix + "snapshot:masterlock" MasterDisLockKey = common.BKCacheKeyV3Prefix + "discover:masterlock" RedisSnapKeyChannelStatus = common.BKCacheKeyV3Prefix + "snapshot:channelstatus" )
View Source
const ( MaxSnapSize = 2000 MaxDiscoverSize = 1000 )
View Source
const ( DiscoverChan = "discover" SnapShotChan = "snapshot" )
View Source
const MOCKMSG = "" /* 7086-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attr ¶
type Attr struct { ID int `json:"id"` OwnerID string `json:"bk_supplier_account"` ObjID string `json:"bk_obj_id"` PropertyGroup string `json:"bk_property_group"` PropertyID string `json:"bk_property_id"` PropertyName string `json:"bk_property_name"` PropertyType string `json:"bk_property_type"` AssociationID string `json:"bk_asst_obj_id"` Option interface{} `json:"option"` Creator string `json:"creator"` Editable bool `json:"editable"` IsRequired bool `json:"isrequired"` IsReadOnly bool `json:"isreadonly"` IsOnly bool `json:"isonly"` Description string `json:"description"` }
type DataCollection ¶
type DataCollection struct { Config *options.Config *backbone.Engine // contains filtered or unexported fields }
func NewDataCollection ¶
func NewDataCollection(config *options.Config, backbone *backbone.Engine) *DataCollection
func (*DataCollection) Run ¶
func (d *DataCollection) Run() error
type DetailResult ¶
type DetailResult struct { ResultBase Data struct { Count int `json:"count"` Info []MapData `json:"info"` } `json:"data"` }
type Discover ¶
func NewDiscover ¶
func (*Discover) CreateModelAttrKey ¶
func (*Discover) CreateModelKey ¶
func (*Discover) GetInstFromRedis ¶
func (*Discover) GetModelAttrsFromRedis ¶
func (*Discover) GetModelFromRedis ¶
func (*Discover) TryCreateModel ¶
func (*Discover) TrySetRedis ¶
func (*Discover) TryUnsetRedis ¶
func (*Discover) UpdateOrAppendAttrs ¶
func (*Discover) UpdateOrCreateInst ¶
type HostSnap ¶
func NewHostSnap ¶
type ListResult ¶
type ListResult struct { ResultBase Data []MapData `json:"data"` }
type Result ¶
type Result struct { ResultBase Data interface{} `json:"data"` }
type ResultBase ¶
type SingleRelated ¶
type SingleRelated []Related
Click to show internal directories.
Click to hide internal directories.