Documentation ¶
Index ¶
- Constants
- func LoadGeoIPData()
- func PrintPublishEvent(event common.MapStr)
- type ElasticsearchOutputType
- func (out *ElasticsearchOutputType) EnableTTL() error
- func (out *ElasticsearchOutputType) GetNameByIP(ip string) string
- func (out *ElasticsearchOutputType) Init(config config.MothershipConfig, topology_expire int) error
- func (out *ElasticsearchOutputType) PublishEvent(ts time.Time, event common.MapStr) error
- func (out *ElasticsearchOutputType) PublishIPs(name string, localAddrs []string) error
- func (out *ElasticsearchOutputType) UpdateLocalTopologyMap()
- type FileOutputType
- type FileRotator
- func (rotator *FileRotator) CheckIfConfigSane() error
- func (rotator *FileRotator) CreateDirectory() error
- func (rotator *FileRotator) FileExists(file_no int) bool
- func (rotator *FileRotator) FilePath(file_no int) string
- func (rotator *FileRotator) Rotate() error
- func (rotator *FileRotator) WriteLine(line []byte) error
- type OutputInterface
- type PublishedTopology
- type PublisherType
- type RedisDataType
- type RedisOutputType
- func (out *RedisOutputType) Close()
- func (out *RedisOutputType) Connect() error
- func (out *RedisOutputType) GetNameByIP(ip string) string
- func (out *RedisOutputType) Init(config config.MothershipConfig, topology_expire int) error
- func (out *RedisOutputType) PublishEvent(ts time.Time, event common.MapStr) error
- func (out *RedisOutputType) PublishIPs(name string, localAddrs []string) error
- func (out *RedisOutputType) Reconnect()
- func (out *RedisOutputType) RedisConnect(db int) (redis.Conn, error)
- func (out *RedisOutputType) SendMessagesGoroutine()
- func (out *RedisOutputType) UpdateLocalTopologyMap(conn redis.Conn)
- type RedisQueueMsg
- type Topology
Constants ¶
View Source
const RotatorMaxFiles = 1000
Variables ¶
This section is empty.
Functions ¶
func LoadGeoIPData ¶
func LoadGeoIPData()
func PrintPublishEvent ¶
Types ¶
type ElasticsearchOutputType ¶
type ElasticsearchOutputType struct { OutputInterface Index string TopologyExpire int TopologyMap map[string]string }
func (*ElasticsearchOutputType) EnableTTL ¶
func (out *ElasticsearchOutputType) EnableTTL() error
func (*ElasticsearchOutputType) GetNameByIP ¶
func (out *ElasticsearchOutputType) GetNameByIP(ip string) string
func (*ElasticsearchOutputType) Init ¶
func (out *ElasticsearchOutputType) Init(config config.MothershipConfig, topology_expire int) error
func (*ElasticsearchOutputType) PublishEvent ¶
func (*ElasticsearchOutputType) PublishIPs ¶
func (out *ElasticsearchOutputType) PublishIPs(name string, localAddrs []string) error
func (*ElasticsearchOutputType) UpdateLocalTopologyMap ¶
func (out *ElasticsearchOutputType) UpdateLocalTopologyMap()
type FileOutputType ¶
type FileOutputType struct { OutputInterface // contains filtered or unexported fields }
func (*FileOutputType) Init ¶
func (out *FileOutputType) Init(config config.MothershipConfig) error
func (*FileOutputType) PublishEvent ¶
func (*FileOutputType) PublishIPs ¶
func (out *FileOutputType) PublishIPs(name string, localAddrs []string) error
func (*FileOutputType) UpdateLocalTopologyMap ¶
func (out *FileOutputType) UpdateLocalTopologyMap()
type FileRotator ¶
type FileRotator struct { Path string Name string RotateEveryBytes uint64 KeepFiles int // contains filtered or unexported fields }
func (*FileRotator) CheckIfConfigSane ¶
func (rotator *FileRotator) CheckIfConfigSane() error
func (*FileRotator) CreateDirectory ¶
func (rotator *FileRotator) CreateDirectory() error
func (*FileRotator) FileExists ¶
func (rotator *FileRotator) FileExists(file_no int) bool
func (*FileRotator) FilePath ¶
func (rotator *FileRotator) FilePath(file_no int) string
func (*FileRotator) Rotate ¶
func (rotator *FileRotator) Rotate() error
func (*FileRotator) WriteLine ¶
func (rotator *FileRotator) WriteLine(line []byte) error
type OutputInterface ¶
type PublishedTopology ¶
type PublisherType ¶
type PublisherType struct { Index string Output []OutputInterface TopologyOutput OutputInterface ElasticsearchOutput ElasticsearchOutputType RedisOutput RedisOutputType FileOutput FileOutputType RefreshTopologyTimer <-chan time.Time Queue chan common.MapStr // contains filtered or unexported fields }
var Publisher PublisherType
func (*PublisherType) GetServerName ¶
func (publisher *PublisherType) GetServerName(ip string) string
func (*PublisherType) Init ¶
func (publisher *PublisherType) Init(publishDisabled bool) error
func (*PublisherType) PublishTopology ¶
func (publisher *PublisherType) PublishTopology(params ...string) error
func (*PublisherType) UpdateTopologyPeriodically ¶
func (publisher *PublisherType) UpdateTopologyPeriodically()
type RedisDataType ¶
type RedisDataType uint16
const ( RedisListType RedisDataType = iota RedisChannelType )
type RedisOutputType ¶
type RedisOutputType struct { OutputInterface Index string Conn redis.Conn TopologyExpire time.Duration ReconnectInterval time.Duration Hostname string Password string Db int DbTopology int Timeout time.Duration DataType RedisDataType FlushInterval time.Duration TopologyMap map[string]string // contains filtered or unexported fields }
func (*RedisOutputType) Close ¶
func (out *RedisOutputType) Close()
func (*RedisOutputType) Connect ¶
func (out *RedisOutputType) Connect() error
func (*RedisOutputType) GetNameByIP ¶
func (out *RedisOutputType) GetNameByIP(ip string) string
func (*RedisOutputType) Init ¶
func (out *RedisOutputType) Init(config config.MothershipConfig, topology_expire int) error
func (*RedisOutputType) PublishEvent ¶
func (*RedisOutputType) PublishIPs ¶
func (out *RedisOutputType) PublishIPs(name string, localAddrs []string) error
func (*RedisOutputType) Reconnect ¶
func (out *RedisOutputType) Reconnect()
func (*RedisOutputType) RedisConnect ¶
func (out *RedisOutputType) RedisConnect(db int) (redis.Conn, error)
func (*RedisOutputType) SendMessagesGoroutine ¶
func (out *RedisOutputType) SendMessagesGoroutine()
func (*RedisOutputType) UpdateLocalTopologyMap ¶
func (out *RedisOutputType) UpdateLocalTopologyMap(conn redis.Conn)
type RedisQueueMsg ¶
type RedisQueueMsg struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.