Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheRemove ¶ added in v1.3.5
func ProcessMetricMsg ¶ added in v1.3.5
func ProcessMetricMsg(sub *rpc.Subscription, metrics []prometheus.Metric) (send bool, out map[string]interface{})
Types ¶
type Notifier ¶ added in v1.3.5
type Notifier struct {
// contains filtered or unexported fields
}
func NewNotifier ¶ added in v1.3.5
func NewNotifier(n *rpc.Notifier, sub *rpc.Subscription) *Notifier
NewNotifier wrap *rpc.INotifier to meet the interface named INotifier
type NotifierWithDelay ¶ added in v1.3.5
type NotifierWithDelay struct {
// contains filtered or unexported fields
}
func NewNotifierWithDelay ¶ added in v1.3.5
func NewNotifierWithDelay(notifier *rpc.Notifier, sub *rpc.Subscription, delay int, sendArray bool) *NotifierWithDelay
NewNotifierWithDelay wrap *rpc.INotifier to add some extra features
func (*NotifierWithDelay) Err ¶ added in v1.3.5
func (n *NotifierWithDelay) Err() <-chan error
func (*NotifierWithDelay) Notify ¶ added in v1.3.5
func (n *NotifierWithDelay) Notify(key string, data interface{}) error
type NotifierWithMsgChan ¶ added in v1.3.5
type NotifierWithMsgChan struct { MsgChan chan interface{} // msg will be sent to this chan ErrChan chan error // close this chan if you want to unsubscribe }
func NewNotifierWithMsgChan ¶ added in v1.3.5
func NewNotifierWithMsgChan() *NotifierWithMsgChan
NewNotifierWithMsgChan return a notifier which will use method named Notify to send message to a field named MsgChan in the notifier
func (*NotifierWithMsgChan) Err ¶ added in v1.3.5
func (n *NotifierWithMsgChan) Err() <-chan error
func (*NotifierWithMsgChan) Notify ¶ added in v1.3.5
func (n *NotifierWithMsgChan) Notify(_ string, data interface{}) error
type SubPub ¶ added in v1.3.5
type SubPub interface { // Subscribe a subscription,creates a mapping from nameSpace_kind_param to INotifier Subscribe(iNotifier INotifier, nameSpace string, kind string, param string) error // Publish finds the notifier corresponding to the key nameSpace_kind_param, and then calls the Notify method of // notify to publish message Publish(nameSpace string, kind string, param string, message interface{}) error // PublishArray finds the notifier corresponding to the key nameSpace_kind_param, and then calls the Notify method of // notify to publish a group of message PublishArray(nameSpace string, kind string, field string, messageList []interface{}) error }
Click to show internal directories.
Click to hide internal directories.