Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationInfo ¶
type ApplicationInfo struct { Name string `json:"name"` Host string `json:"host"` Hostname string `json:"hostname"` InitedAt time.Time `json:"inited_at"` Tasks map[string][]string `json:"tasks"` Servers map[string]time.Time `json:"servers,omitempty"` }
ApplicationInfo with basic description
func (*ApplicationInfo) Merge ¶
func (app *ApplicationInfo) Merge(info *ApplicationInfo)
Merge application info
type ClusterInfoReader ¶
type ClusterInfoReader interface { ApplicationInfo() (*ApplicationInfo, error) TaskInfo(name string) (*TaskInfo, error) TaskInfoByID(id string) (*TaskInfo, error) ListOfNodes() (map[string][]string, int, error) }
ClusterInfoReader provides methods of information reading
type EventType ¶ added in v0.3.0
type EventType interface { fmt.Stringer // ID of the event ID() uuid.UUID // Name of the event Name() string // Err returns error response object Err() error // CreatedAt returns the date of the event generation CreatedAt() time.Time }
EventType defines minimal event functionality
func NewErrorEvent ¶ added in v0.3.0
NewErrorEvent returns new type event with error
func WrapEventWithName ¶ added in v0.3.0
WrapEventWithName returns new wrapped event
type MetricReader ¶ added in v0.2.1
type MetricReader interface { ApplicationInfo() *ApplicationInfo ReceiveCount() (uint64, error) TaskInfo(name string) (*TaskInfo, error) FailoverTaskInfo(name string) (*TaskInfo, error) }
MetricReader of information
type MetricUpdater ¶ added in v0.2.1
type MetricUpdater interface { RegisterApplication(appInfo *ApplicationInfo) error DeregisterApplication() error ReceiveEvent(event EventType) error ExecuteTask(event EventType, execTime time.Duration) error ExecuteFailoverTask(event EventType, execTime time.Duration) error }
MetricUpdater increments data metric
type Storage ¶
type Storage interface { MetricUpdater MetricReader }
Storage data accessor for monitoring
type TaskInfo ¶
type TaskInfo struct { TotalCount uint64 `json:"total_count"` ErrorCount uint64 `json:"error_count"` SuccessCount uint64 `json:"success_count"` SkipCount uint64 `json:"skip_count"` MinExecTime time.Duration `json:"min_exec_time"` AvgExecTime time.Duration `json:"avg_exec_time"` MaxExecTime time.Duration `json:"max_exec_time"` TaskNames []string `json:"task_names,omitempty"` // The list of finished task names UpdatedAt time.Time `json:"updated_at"` }
TaskInfo aggregated in one record
func (*TaskInfo) AddTaskName ¶ added in v0.3.0
AddTaskName to the list
Click to show internal directories.
Click to hide internal directories.