Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigType = map[string]proto.ConfigType{ "PIPELINE_CONFIG": proto.ConfigType_PIPELINE_CONFIG, "AGENT_CONFIG": proto.ConfigType_AGENT_CONFIG, }
View Source
var ModelTypes = map[string]reflect.Type{ common.TypeAgentAttributes: reflect.TypeOf(([]*AgentAttributes)(nil)), common.TypeAgent: reflect.TypeOf(([]*Agent)(nil)), common.TypeConfigDetail: reflect.TypeOf(([]*ConfigDetail)(nil)), common.TypeAgentGROUP: reflect.TypeOf(([]*AgentGroup)(nil)), common.TypeCommand: reflect.TypeOf(([]*Command)(nil)), }
View Source
var Models = map[string]interface{}{ common.TypeAgentAttributes: &AgentAttributes{}, common.TypeAgent: &Agent{}, common.TypeConfigDetail: &ConfigDetail{}, common.TypeAgentGROUP: &AgentGroup{}, common.TypeCommand: &Command{}, }
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
AgentID string `json:"AgentID" gorm:"primaryKey;column:agent_id"`
AgentType string `json:"AgentType"`
Attributes AgentAttributes `json:"Attributes"`
Tags []string `json:"Tags" gorm:"-"`
SerializedTags string `json:"-" gorm:"column:tags;type:json"`
RunningStatus string `json:"RunningStatus"`
StartupTime int64 `json:"StartupTime"`
Interval int32 `json:"Interval"`
}
func (*Agent) ParseProto ¶
type AgentAttributes ¶
type AgentAttributes struct {
Version string `json:"Version"`
Category string `json:"Category"`
IP string `json:"IP"`
Hostname string `json:"Hostname"`
Region string `json:"Region"`
Zone string `json:"Zone"`
Extras map[string]string `json:"Extras"`
}
func (*AgentAttributes) ParseProto ¶
func (a *AgentAttributes) ParseProto(pa *proto.AgentAttributes)
func (*AgentAttributes) Scan ¶
func (a *AgentAttributes) Scan(value interface{}) error
func (*AgentAttributes) ToProto ¶
func (a *AgentAttributes) ToProto() *proto.AgentAttributes
type AgentGroup ¶
type AgentGroup struct {
Name string `json:"Name" gorm:"primaryKey"`
Description string `json:"Description"`
Tags []AgentGroupTag `json:"Tags" gorm:"-"`
SerializedTags string `json:"-" gorm:"column:tags;type:json"`
AppliedConfigs map[string]int64 `json:"AppliedConfigs" gorm:"-"`
SerializedAppliedConfigs string `json:"-" gorm:"column:applied_configs;type:json"`
}
func (*AgentGroup) BeforeSave ¶
func (a *AgentGroup) BeforeSave(tx *gorm.DB) (err error)
func (*AgentGroup) ParseProto ¶
func (a *AgentGroup) ParseProto(pa *proto.AgentGroup)
func (AgentGroup) TableName ¶
func (AgentGroup) TableName() string
func (*AgentGroup) ToProto ¶
func (a *AgentGroup) ToProto() *proto.AgentGroup
type AgentGroupTag ¶
type Command ¶
type Command struct {
Type string `json:"Type"`
Name string `json:"Name"`
ID string `json:"ID"`
Args map[string]string `json:"Args"`
}
func (*Command) ParseProto ¶
type ConfigDetail ¶
type ConfigDetail struct {
Type string `json:"Type"`
Name string `json:"Name" gorm:"primaryKey"`
Version int64 `json:"Version"`
Context string `json:"Context"`
Detail string `json:"Detail"`
DelTag bool `json:"DelTag"`
}
func (*ConfigDetail) ParseProto ¶
func (c *ConfigDetail) ParseProto(pc *proto.ConfigDetail)
func (ConfigDetail) TableName ¶
func (ConfigDetail) TableName() string
func (*ConfigDetail) ToProto ¶
func (c *ConfigDetail) ToProto() *proto.ConfigDetail
Click to show internal directories.
Click to hide internal directories.