Documentation ¶
Index ¶
- Constants
- Variables
- func ClusterList(c *gin.Context)
- func ConnCount(c *gin.Context)
- func ConnList(c *gin.Context)
- func ConnReset(c *gin.Context)
- func ConnStat(c *gin.Context)
- func CreateResponse(c *gin.Context, code int, data interface{})
- func PostCommand(c *gin.Context)
- func RDAudit(c *gin.Context)
- type AuditEvent
- type AuditLogWriter
- type CommandDetail
- type CommandRequest
- type ConfigMsg
- type ConnStatRsp
- type Res
- type ResetRequest
- type Response
- type TaskMsg
Constants ¶
View Source
const ( SuccessCode = iota AuthFailedErrorCode ParamInvalidErrorCode UnknownErrorCode )
View Source
const ( ConnResetRandom = "random" ConnResetStrict = "strict" )
View Source
const (
AuditEventDataType = "9003"
)
Variables ¶
View Source
var ErrorDescriptions = map[int]string{ SuccessCode: "success", AuthFailedErrorCode: "auth failed", ParamInvalidErrorCode: "param invalid", UnknownErrorCode: "some errors occurred", }
Functions ¶
func ClusterList ¶
func CreateResponse ¶
func PostCommand ¶
Types ¶
type AuditEvent ¶
type AuditEvent struct { ClusterID string `json:"cluster_id"` // 集群 uuid,来自客户端证书中的 Subject CN(客户集群 uuid 及其证书由 console 生成和签发) Event *v1.Event `json:"event"` // k8s Event // 以下字段为 AgentCenter 追加的字段 DataType string `json:"data_type"` }
AuditEvent
type AuditLogWriter ¶
type AuditLogWriter struct {
// contains filtered or unexported fields
}
func (*AuditLogWriter) Add ¶
func (w *AuditLogWriter) Add(v *AuditEvent)
func (*AuditLogWriter) Init ¶
func (w *AuditLogWriter) Init()
func (*AuditLogWriter) Run ¶
func (w *AuditLogWriter) Run()
type CommandDetail ¶
type CommandRequest ¶
type CommandRequest struct { AgentID string `json:"agent_id" bson:"agent_id" binding:"required"` Command CommandDetail `json:"command" bson:"command" binding:"required"` }
type ConfigMsg ¶
type ConfigMsg struct { Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Version string `json:"version,omitempty"` SHA256 string `json:"sha256,omitempty"` Signature string `json:"signature,omitempty"` DownloadURL []string `json:"download_url,omitempty"` Detail string `json:"detail,omitempty"` }
type ConnStatRsp ¶
type ResetRequest ¶
Click to show internal directories.
Click to hide internal directories.