Documentation ¶
Index ¶
- Constants
- Variables
- func Init(config *Config) (err error)
- func Shutdown()
- type Config
- type ConfigService
- func (c *ConfigService) GetDomain() string
- func (c *ConfigService) GetEnv() string
- func (c *ConfigService) GetHostname() string
- func (c *ConfigService) GetIp() string
- func (c *ConfigService) GetIpHex() string
- func (c *ConfigService) GetRouters() []string
- func (c *ConfigService) GetSample() float64
- func (c *ConfigService) GetSenderHighQueueConsumerNum() int
- func (c *ConfigService) GetSenderNormalQueueConsumerNum() int
- func (c *ConfigService) GetServers() []string
- func (c *ConfigService) IsEnabled() bool
- func (c *ConfigService) RoutersCondWait()
Constants ¶
View Source
const ( DefaultHostname = "UnknownHost" DefaultEnv = "dev" DefaultIp = "127.0.0.1" DefaultIpHex = "7f000001" TypeSystem = "System" TypeHeartbeat = "Heartbeat" NameReboot = "Reboot" NameTransactionAggregator = "TransactionAggregator" NameEventAggregator = "EventAggregator" NameStatus = "Status" NameStatusExtensionPrefix = "StatusExtension-" BatchFlag = '@' BatchSplit = ';' TcpSenderHighQueueSize = 50000 TcpSenderNormalQueueSize = 50000 DefaultTcpSenderNormalQueueConsumerNum = 10 DefaultTcpSenderHighQueueConsumerNum = 10 TcpSenderQueueConsumerTickerDuration = 1000 * time.Millisecond TcpSenderQueueConsumerBufSize = 150 EventAggregatorTickerDuration = 3 * time.Second TransactionAggregatorTickerDuration = 3 * time.Second EventAggregatorChannelSize = 1000 TransactionAggregatorChannelSize = 1000 RouterUpdateDuration = 60 * time.Second )
Variables ¶
View Source
var ( BinaryProtocol = []byte("NT1") ThreadNameCatAgent = []byte("cat-agent") ThreadGroupNameCatAgent = []byte("cat-agent-group") )
Functions ¶
Types ¶
type Config ¶
type Config struct { Domain string `yaml:"domain"` Hostname string `yaml:"hostname"` Env string `yaml:"env"` Ip string `yaml:"ip"` IpHex string `yaml:"ip_hex"` Servers []string `yaml:"servers"` SenderNormalQueueConsumerNum int `yaml:"sender_normal_queue_consumer_num"` SenderHighQueueConsumerNum int `yaml:"sender_high_queue_consumer_num"` }
type ConfigService ¶
type ConfigService struct {
// contains filtered or unexported fields
}
func GetInstance ¶
func GetInstance() *ConfigService
func (*ConfigService) GetDomain ¶
func (c *ConfigService) GetDomain() string
func (*ConfigService) GetEnv ¶
func (c *ConfigService) GetEnv() string
func (*ConfigService) GetHostname ¶
func (c *ConfigService) GetHostname() string
func (*ConfigService) GetIp ¶
func (c *ConfigService) GetIp() string
func (*ConfigService) GetIpHex ¶
func (c *ConfigService) GetIpHex() string
func (*ConfigService) GetRouters ¶
func (c *ConfigService) GetRouters() []string
func (*ConfigService) GetSample ¶
func (c *ConfigService) GetSample() float64
func (*ConfigService) GetSenderHighQueueConsumerNum ¶
func (c *ConfigService) GetSenderHighQueueConsumerNum() int
func (*ConfigService) GetSenderNormalQueueConsumerNum ¶
func (c *ConfigService) GetSenderNormalQueueConsumerNum() int
func (*ConfigService) GetServers ¶
func (c *ConfigService) GetServers() []string
func (*ConfigService) IsEnabled ¶
func (c *ConfigService) IsEnabled() bool
func (*ConfigService) RoutersCondWait ¶
func (c *ConfigService) RoutersCondWait()
Click to show internal directories.
Click to hide internal directories.