Documentation ¶
Overview ¶
Package alarm manages health status alarms in etcd.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlarmStore ¶
type AlarmStore struct {
// contains filtered or unexported fields
}
AlarmStore persists alarms to the backend.
func NewAlarmStore ¶
func NewAlarmStore(bg BackendGetter) (*AlarmStore, error)
func (*AlarmStore) Activate ¶
func (a *AlarmStore) Activate(id types.ID, at pb.AlarmType) *pb.AlarmMember
该方法负责新建AlarmMember实例,并将其记录到AlarmStore.types字段和底层存储中。
func (*AlarmStore) Deactivate ¶
func (a *AlarmStore) Deactivate(id types.ID, at pb.AlarmType) *pb.AlarmMember
该方法麦从types字段和底层存储中删除指定的AlarmMember实例。
func (*AlarmStore) Get ¶
func (a *AlarmStore) Get(at pb.AlarmType) (ret []*pb.AlarmMember)
type BackendGetter ¶
Click to show internal directories.
Click to hide internal directories.