Documentation ¶
Index ¶
- Variables
- func GetCurrentDir() string
- func InstanceDiscovery() error
- func SetPid(curPath string) int
- type FieldsFunc
- type LogFields
- type Metrics
- func (s *Metrics) DecrCometNodes()
- func (s *Metrics) IncrBroadcastMsg()
- func (s *Metrics) IncrBroadcastMsgFailed()
- func (s *Metrics) IncrBroadcastRoomMsg()
- func (s *Metrics) IncrBroadcastRoomMsgFailed()
- func (s *Metrics) IncrCometNodes()
- func (s *Metrics) IncrPushMsg()
- func (s *Metrics) IncrPushMsgFailed()
- func (s *Metrics) SetActiveRoomCount(n float64)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Conf *conf.Config Logger logger MetricsStat *Metrics )
View Source
var ServiceInstancer *consulsd.Instancer
Functions ¶
func GetCurrentDir ¶
func GetCurrentDir() string
func InstanceDiscovery ¶
func InstanceDiscovery() error
Types ¶
type FieldsFunc ¶
type FieldsFunc func() *LogFields
type LogFields ¶
type LogFields struct {
// contains filtered or unexported fields
}
func NewLogFields ¶
func NewLogFields() *LogFields
type Metrics ¶
type Metrics struct { // messages AllMsg metrics.Counter PushMsg metrics.Counter BroadcastMsg metrics.Counter BroadcastRoomMsg metrics.Counter // miss PushMsgFailed metrics.Counter BroadcastMsgFailed metrics.Counter BroadcastRoomMsgFailed metrics.Counter // room ActiveRoomCount metrics.Gauge // nodes CometNodes metrics.Gauge }
func MetricsInstrumenting ¶
func MetricsInstrumenting() *Metrics
func (*Metrics) DecrCometNodes ¶
func (s *Metrics) DecrCometNodes()
func (*Metrics) IncrBroadcastMsg ¶
func (s *Metrics) IncrBroadcastMsg()
func (*Metrics) IncrBroadcastMsgFailed ¶
func (s *Metrics) IncrBroadcastMsgFailed()
func (*Metrics) IncrBroadcastRoomMsg ¶
func (s *Metrics) IncrBroadcastRoomMsg()
func (*Metrics) IncrBroadcastRoomMsgFailed ¶
func (s *Metrics) IncrBroadcastRoomMsgFailed()
func (*Metrics) IncrCometNodes ¶
func (s *Metrics) IncrCometNodes()
func (*Metrics) IncrPushMsg ¶
func (s *Metrics) IncrPushMsg()
func (*Metrics) IncrPushMsgFailed ¶
func (s *Metrics) IncrPushMsgFailed()
func (*Metrics) SetActiveRoomCount ¶
Click to show internal directories.
Click to hide internal directories.