Documentation ¶
Index ¶
- Variables
- type Channel
- func (c *Channel) Close() error
- func (c *Channel) Publish(ctx context.Context, msg interface{})
- func (c *Channel) Running() bool
- func (c *Channel) Start() error
- func (c *Channel) Subscribe() (chan interface{}, error)
- func (c *Channel) Subscribers() []chan interface{}
- func (c *Channel) Unsubscribe(subscriber chan interface{}) error
- type ChannelConfig
- func (*ChannelConfig) Descriptor() ([]byte, []int)deprecated
- func (x *ChannelConfig) GetBlocking() bool
- func (x *ChannelConfig) GetBufferSize() int32
- func (x *ChannelConfig) GetSubscriberLimit() int32
- func (*ChannelConfig) ProtoMessage()
- func (x *ChannelConfig) ProtoReflect() protoreflect.Message
- func (x *ChannelConfig) Reset()
- func (x *ChannelConfig) String() string
- type Config
- type Counter
- type Manager
- func (m *Manager) Close() error
- func (m *Manager) GetChannel(name string) stats.Channel
- func (m *Manager) GetCounter(name string) stats.Counter
- func (m *Manager) GetOnlineMap(name string) stats.OnlineMap
- func (m *Manager) RegisterChannel(name string) (stats.Channel, error)
- func (m *Manager) RegisterCounter(name string) (stats.Counter, error)
- func (m *Manager) RegisterOnlineMap(name string) (stats.OnlineMap, error)
- func (m *Manager) Start() error
- func (*Manager) Type() interface{}
- func (m *Manager) UnregisterChannel(name string) error
- func (m *Manager) UnregisterCounter(name string) error
- func (m *Manager) UnregisterOnlineMap(name string) error
- func (m *Manager) VisitCounters(visitor func(string, stats.Counter) bool)
- type OnlineMap
Constants ¶
This section is empty.
Variables ¶
var File_app_stats_config_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Channel is an implementation of stats.Channel.
func NewChannel ¶
func NewChannel(config *ChannelConfig) *Channel
NewChannel creates an instance of Statistics Channel.
func (*Channel) Subscribers ¶
func (c *Channel) Subscribers() []chan interface{}
Subscribers implements stats.Channel.
func (*Channel) Unsubscribe ¶
Unsubscribe implements stats.Channel.
type ChannelConfig ¶
type ChannelConfig struct { Blocking bool `protobuf:"varint,1,opt,name=Blocking,proto3" json:"Blocking,omitempty"` SubscriberLimit int32 `protobuf:"varint,2,opt,name=SubscriberLimit,proto3" json:"SubscriberLimit,omitempty"` BufferSize int32 `protobuf:"varint,3,opt,name=BufferSize,proto3" json:"BufferSize,omitempty"` // contains filtered or unexported fields }
func (*ChannelConfig) Descriptor
deprecated
func (*ChannelConfig) Descriptor() ([]byte, []int)
Deprecated: Use ChannelConfig.ProtoReflect.Descriptor instead.
func (*ChannelConfig) GetBlocking ¶
func (x *ChannelConfig) GetBlocking() bool
func (*ChannelConfig) GetBufferSize ¶
func (x *ChannelConfig) GetBufferSize() int32
func (*ChannelConfig) GetSubscriberLimit ¶
func (x *ChannelConfig) GetSubscriberLimit() int32
func (*ChannelConfig) ProtoMessage ¶
func (*ChannelConfig) ProtoMessage()
func (*ChannelConfig) ProtoReflect ¶
func (x *ChannelConfig) ProtoReflect() protoreflect.Message
func (*ChannelConfig) Reset ¶
func (x *ChannelConfig) Reset()
func (*ChannelConfig) String ¶
func (x *ChannelConfig) String() string
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) Descriptor
deprecated
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter is an implementation of stats.Counter.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is an implementation of stats.Manager.
func NewManager ¶
NewManager creates an instance of Statistics Manager.
func (*Manager) GetChannel ¶
GetChannel implements stats.Manager.
func (*Manager) GetCounter ¶
GetCounter implements stats.Manager.
func (*Manager) GetOnlineMap ¶
GetOnlineMap implements stats.Manager.
func (*Manager) RegisterChannel ¶
RegisterChannel implements stats.Manager.
func (*Manager) RegisterCounter ¶
RegisterCounter implements stats.Manager.
func (*Manager) RegisterOnlineMap ¶
RegisterOnlineMap implements stats.Manager.
func (*Manager) UnregisterChannel ¶
UnregisterChannel implements stats.Manager.
func (*Manager) UnregisterCounter ¶
UnregisterCounter implements stats.Manager.
func (*Manager) UnregisterOnlineMap ¶
UnregisterOnlineMap implements stats.Manager.
type OnlineMap ¶
type OnlineMap struct {
// contains filtered or unexported fields
}
OnlineMap is an implementation of stats.OnlineMap.
func NewOnlineMap ¶
func NewOnlineMap() *OnlineMap
NewOnlineMap creates a new instance of OnlineMap.