Documentation ¶
Index ¶
- Constants
- func ConvertFromPostgresSnapshots(snapshots []*Snapshot) []*apiPb.SchedulerSnapshot
- func ConvertFromPostgressStatRequest(data *StatRequest) (*apiPb.GetAgentInformationResponse_Statistic, error)
- func ConvertFromPostgressStatRequests(data []*StatRequest) []*apiPb.GetAgentInformationResponse_Statistic
- type CPUInfo
- type DiskInfo
- type GroupResult
- type Incident
- type IncidentHistory
- type MemoryInfo
- type MemoryMem
- type MemorySwap
- type NetInfo
- type Postgres
- func (p *Postgres) GetActiveIncidentByRuleId(ruleId string) (*apiPb.Incident, error)
- func (p *Postgres) GetCPUInfo(agentID string, pagination *apiPb.Pagination, filter *apiPb.TimeFilter) ([]*apiPb.GetAgentInformationResponse_Statistic, int32, error)
- func (p *Postgres) GetDiskInfo(agentID string, pagination *apiPb.Pagination, filter *apiPb.TimeFilter) ([]*apiPb.GetAgentInformationResponse_Statistic, int32, error)
- func (p *Postgres) GetIncidentById(id string) (*apiPb.Incident, error)
- func (p *Postgres) GetIncidents(request *apiPb.GetIncidentsListRequest) ([]*apiPb.Incident, int64, error)
- func (p *Postgres) GetMemoryInfo(agentID string, pagination *apiPb.Pagination, filter *apiPb.TimeFilter) ([]*apiPb.GetAgentInformationResponse_Statistic, int32, error)
- func (p *Postgres) GetNetInfo(agentID string, pagination *apiPb.Pagination, filter *apiPb.TimeFilter) ([]*apiPb.GetAgentInformationResponse_Statistic, int32, error)
- func (p *Postgres) GetSnapshots(request *apiPb.GetSchedulerInformationRequest) ([]*apiPb.SchedulerSnapshot, int32, error)
- func (p *Postgres) GetSnapshotsUptime(request *apiPb.GetSchedulerUptimeRequest) (*apiPb.GetSchedulerUptimeResponse, error)
- func (p *Postgres) GetStatRequest(agentID string, pagination *apiPb.Pagination, filter *apiPb.TimeFilter) ([]*apiPb.GetAgentInformationResponse_Statistic, int32, error)
- func (p *Postgres) GetTransactionByID(request *apiPb.GetTransactionByIdRequest) (*apiPb.TransactionInfo, []*apiPb.TransactionInfo, error)
- func (p *Postgres) GetTransactionChildren(transactionId, passedString string) ([]*TransactionInfo, error)
- func (p *Postgres) GetTransactionGroup(request *apiPb.GetTransactionGroupRequest) (map[string]*apiPb.TransactionGroup, error)
- func (p *Postgres) GetTransactionInfo(request *apiPb.GetTransactionsRequest) ([]*apiPb.TransactionInfo, int64, error)
- func (p *Postgres) InsertIncident(data *apiPb.Incident) error
- func (p *Postgres) InsertSnapshot(data *apiPb.SchedulerResponse) error
- func (p *Postgres) InsertStatRequest(data *apiPb.Metric) error
- func (p *Postgres) InsertTransactionInfo(data *apiPb.TransactionInfo) error
- func (p *Postgres) Migrate() error
- func (p *Postgres) UpdateIncidentStatus(id string, status apiPb.IncidentStatus) (*apiPb.Incident, error)
- type Snapshot
- type StatRequest
- type TransactionInfo
- type UptimeResult
Constants ¶
View Source
const (
NoIncident = "NO_INCIDENT"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertFromPostgresSnapshots ¶
func ConvertFromPostgresSnapshots(snapshots []*Snapshot) []*apiPb.SchedulerSnapshot
func ConvertFromPostgressStatRequest ¶
func ConvertFromPostgressStatRequest(data *StatRequest) (*apiPb.GetAgentInformationResponse_Statistic, error)
func ConvertFromPostgressStatRequests ¶
func ConvertFromPostgressStatRequests(data []*StatRequest) []*apiPb.GetAgentInformationResponse_Statistic
Types ¶
type GroupResult ¶
type GroupResult struct { Name string `gorm:"column:groupName"` Count int64 `gorm:"column:count"` SuccessCount int64 `gorm:"column:successCount"` Latency string `gorm:"column:latency"` MinTime string `gorm:"column:minTime"` MaxTime string `gorm:"column:maxTime"` LowTime string `gorm:"column:lowTime"` }
type IncidentHistory ¶
type MemoryInfo ¶
type MemoryInfo struct { gorm.Model StatRequestID uint `gorm:"column:statRequestId"` Mem *MemoryMem `gorm:"column:mem"` Swap *MemorySwap `gorm:"column:swap"` }
type MemorySwap ¶
type NetInfo ¶
type NetInfo struct { gorm.Model StatRequestID uint `gorm:"column:statRequestId"` Name string `gorm:"column:name"` BytesSent uint64 `gorm:"column:bytesSent"` BytesRecv uint64 `gorm:"column:bytesRecv"` PacketsSent uint64 `gorm:"column:packetsSent"` PacketsRecv uint64 `gorm:"column:packetsRecv"` ErrIn uint64 `gorm:"column:errIn"` ErrOut uint64 `gorm:"column:errOut"` DropIn uint64 `gorm:"column:dropIn"` DropOut uint64 `gorm:"column:dropOut"` }
type Postgres ¶
func (*Postgres) GetActiveIncidentByRuleId ¶
func (*Postgres) GetCPUInfo ¶
func (p *Postgres) GetCPUInfo(agentID string, pagination *apiPb.Pagination, filter *apiPb.TimeFilter) ([]*apiPb.GetAgentInformationResponse_Statistic, int32, error)
func (*Postgres) GetDiskInfo ¶
func (p *Postgres) GetDiskInfo(agentID string, pagination *apiPb.Pagination, filter *apiPb.TimeFilter) ([]*apiPb.GetAgentInformationResponse_Statistic, int32, error)
func (*Postgres) GetIncidentById ¶
func (*Postgres) GetIncidents ¶
func (*Postgres) GetMemoryInfo ¶
func (p *Postgres) GetMemoryInfo(agentID string, pagination *apiPb.Pagination, filter *apiPb.TimeFilter) ([]*apiPb.GetAgentInformationResponse_Statistic, int32, error)
func (*Postgres) GetNetInfo ¶
func (p *Postgres) GetNetInfo(agentID string, pagination *apiPb.Pagination, filter *apiPb.TimeFilter) ([]*apiPb.GetAgentInformationResponse_Statistic, int32, error)
func (*Postgres) GetSnapshots ¶
func (p *Postgres) GetSnapshots(request *apiPb.GetSchedulerInformationRequest) ([]*apiPb.SchedulerSnapshot, int32, error)
func (*Postgres) GetSnapshotsUptime ¶
func (p *Postgres) GetSnapshotsUptime(request *apiPb.GetSchedulerUptimeRequest) (*apiPb.GetSchedulerUptimeResponse, error)
func (*Postgres) GetStatRequest ¶
func (p *Postgres) GetStatRequest(agentID string, pagination *apiPb.Pagination, filter *apiPb.TimeFilter) ([]*apiPb.GetAgentInformationResponse_Statistic, int32, error)
func (*Postgres) GetTransactionByID ¶
func (p *Postgres) GetTransactionByID(request *apiPb.GetTransactionByIdRequest) (*apiPb.TransactionInfo, []*apiPb.TransactionInfo, error)
func (*Postgres) GetTransactionChildren ¶
func (p *Postgres) GetTransactionChildren(transactionId, passedString string) ([]*TransactionInfo, error)
passedString is used in order to prevent cycles
func (*Postgres) GetTransactionGroup ¶
func (p *Postgres) GetTransactionGroup(request *apiPb.GetTransactionGroupRequest) (map[string]*apiPb.TransactionGroup, error)
func (*Postgres) GetTransactionInfo ¶
func (p *Postgres) GetTransactionInfo(request *apiPb.GetTransactionsRequest) ([]*apiPb.TransactionInfo, int64, error)
func (*Postgres) InsertSnapshot ¶
func (p *Postgres) InsertSnapshot(data *apiPb.SchedulerResponse) error
func (*Postgres) InsertTransactionInfo ¶
func (p *Postgres) InsertTransactionInfo(data *apiPb.TransactionInfo) error
func (*Postgres) UpdateIncidentStatus ¶
type Snapshot ¶
type Snapshot struct { gorm.Model SchedulerID string `gorm:"column:schedulerId"` Code int32 `gorm:"column:code"` Type int32 `gorm:"column:type"` Error string `gorm:"column:error"` MetaStartTime int64 `gorm:"column:metaStartTime"` MetaEndTime int64 `gorm:"column:metaEndTime"` MetaValue []byte `gorm:"column:metaValue"` }
func ConvertToPostgresSnapshot ¶
func ConvertToPostgresSnapshot(request *apiPb.SchedulerResponse) (*Snapshot, error)
type StatRequest ¶
type StatRequest struct { gorm.Model AgentID string `gorm:"column:agentID"` AgentName string `gorm:"column:agentName"` CPUInfo []*CPUInfo MemoryInfo *MemoryInfo `gorm:"column:memoryInfo"` DiskInfo []*DiskInfo `gorm:"column:diskInfo"` NetInfo []*NetInfo `gorm:"column:netInfo"` Time time.Time `gorm:"column:time"` }
Agent gorm description
func ConvertToPostgressStatRequest ¶
func ConvertToPostgressStatRequest(request *apiPb.Metric) (*StatRequest, error)
type TransactionInfo ¶
type TransactionInfo struct { gorm.Model TransactionId string `gorm:"column:transactionId"` ApplicationId string `gorm:"column:applicationId"` ParentId string `gorm:"column:parentId"` MetaHost string `gorm:"column:metaHost"` MetaPath string `gorm:"column:metaPath"` MetaMethod string `gorm:"column:metaMethod"` Name string `gorm:"column:name"` StartTime int64 `gorm:"column:startTime"` EndTime int64 `gorm:"column:endTime"` TransactionStatus int32 `gorm:"column:transactionStatus"` TransactionType int32 `gorm:"column:transactionType"` Error string `gorm:"column:error"` }
type UptimeResult ¶
Click to show internal directories.
Click to hide internal directories.