Documentation
¶
Overview ¶
Package observer provides clone monitoring.
Package observer provides clone monitoring.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
CloneDir string
DataSubDir string
SocketDir string
ReplacementRules map[string]string `yaml:"replacementRules"`
}
Config defines configuration options for observer.
type Observer ¶
Observer manages observation sessions.
func NewObserver ¶
func NewObserver(dockerClient *client.Client, cfg *Config, platform *platform.Client, pool *resources.Pool) *Observer
NewObserver creates an Observer instance.
func (*Observer) AddSession ¶
AddSession adds a new observation session to storage.
func (*Observer) GetCloneLog ¶
GetCloneLog gets clone logs. TODO (akartasov): Split log to chunks.
func (*Observer) GetSession ¶
GetSession returns an observation session from storage.
func (*Observer) RemoveSession ¶
RemoveSession removes an observation session from storage.
type ReplacementRule ¶
type ReplacementRule struct {
// contains filtered or unexported fields
}
ReplacementRule describes replacement rules.
type Session ¶
type Session struct {
SessionID uint64 `json:"session_id"`
StartedAt time.Time `json:"started_at"`
FinishedAt time.Time `json:"finished_at"`
Config types.Config `json:"config"`
Tags map[string]string `json:"tags"`
models.ObservationResult `json:"-"`
// contains filtered or unexported fields
}
Session describes a session of service monitoring.
func NewSession ¶
NewSession creates an Session instance.
func (*Session) CheckDuration ¶
CheckDuration checks duration of the operation.
func (*Session) CheckLocks ¶
CheckLocks checks long-lasting locks during the operation.
func (*Session) CheckPerformanceRequirements ¶
CheckPerformanceRequirements checks monitoring data and returns an error if any of performance requires was not satisfied.
func (*Session) PrintSummary ¶
PrintSummary prints monitoring summary.