Versions in this module Expand all Collapse all v0 v0.2.0 Dec 1, 2020 Changes in this version + const DBBatchLogSize + var SyslogStoragePriorities = []maps.Map + func AddAccessLogHook(hook *AccessLogHook) + func AllStorageFormats() []maps.Map + func AllStorages() []maps.Map + func CallAccessLogHooks(accessLog *accesslogs.AccessLog) + func FindPolicy(policyId string) *teaconfigs.AccessLogStoragePolicy + func FindPolicyName(policyId string) string + func FindStorageFormatName(code string) string + func FindStorageTypeName(storageType string) string + func ResetAllPolicies() + func ResetPolicyStorage(policyId string) + type AccessLogHook struct + Process func(accessLog *accesslogs.AccessLog) (goNext bool) + type AccessLogQueue struct + func NewAccessLogQueue(buffer *logbuffer.Buffer, index int) *AccessLogQueue + func (this *AccessLogQueue) Dump() + func (this *AccessLogQueue) Receive(ch chan *accesslogs.AccessLog) + type AccessLogger struct + func NewAccessLogger() *AccessLogger + func SharedLogger() *AccessLogger + func (this *AccessLogger) Push(log *accesslogs.AccessLog) + type CommandStorage struct + Args []string + Command string + Dir string + func (this *CommandStorage) Close() error + func (this *CommandStorage) Start() error + func (this *CommandStorage) Write(accessLogs []*accesslogs.AccessLog) error + type ESStorage struct + Endpoint string + Index string + MappingType string + Password string + Username string + func (this *ESStorage) Close() error + func (this *ESStorage) Start() error + func (this *ESStorage) Write(accessLogs []*accesslogs.AccessLog) error + type FileStorage struct + AutoCreate bool + Path string + func (this *FileStorage) Close() error + func (this *FileStorage) Start() error + func (this *FileStorage) Write(accessLogs []*accesslogs.AccessLog) error + type MySQLStorage struct + AutoCreateTable bool + Database string + Host string + LogField string + Password string + Port int + Table string + Username string + func (this *MySQLStorage) Close() error + func (this *MySQLStorage) Start() error + func (this *MySQLStorage) Write(accessLogs []*accesslogs.AccessLog) error + type Storage struct + Format StorageFormat + Template string + func (this *Storage) FormatAccessLogBytes(accessLog *accesslogs.AccessLog) ([]byte, error) + func (this *Storage) FormatAccessLogString(accessLog *accesslogs.AccessLog) (string, error) + func (this *Storage) FormatVariables(s string) string + type StorageFormat = string + const StorageFormatJSON + const StorageFormatTemplate + type StorageInterface interface + Close func() error + Start func() error + Write func(accessLogs []*accesslogs.AccessLog) error + func DecodePolicyStorage(policy *teaconfigs.AccessLogStoragePolicy) StorageInterface + func FindPolicyStorage(policyId string) StorageInterface + type StorageType = string + const StorageTypeCommand + const StorageTypeES + const StorageTypeFile + const StorageTypeMySQL + const StorageTypeSyslog + const StorageTypeTCP + type SyslogStorage struct + Priority SyslogStoragePriority + Protocol string + ServerAddr string + ServerPort int + Socket string + Tag string + func (this *SyslogStorage) Close() error + func (this *SyslogStorage) Start() error + func (this *SyslogStorage) Write(accessLogs []*accesslogs.AccessLog) error + type SyslogStoragePriority = int + const SyslogStoragePriorityAlert + const SyslogStoragePriorityCrit + const SyslogStoragePriorityDebug + const SyslogStoragePriorityEmerg + const SyslogStoragePriorityErr + const SyslogStoragePriorityInfo + const SyslogStoragePriorityNotice + const SyslogStoragePriorityWarning + type SyslogStorageProtocol = string + const SyslogStorageProtocolNone + const SyslogStorageProtocolSocket + const SyslogStorageProtocolTCP + const SyslogStorageProtocolUDP + type TCPStorage struct + Addr string + Network string + func (this *TCPStorage) Close() error + func (this *TCPStorage) Start() error + func (this *TCPStorage) Write(accessLogs []*accesslogs.AccessLog) error