Documentation ¶
Index ¶
- Variables
- func CleanInvalidStatesInLocal()
- func CreateExtractors()
- func Extract(data chan FileEvent)
- func ExtractOsLog(data chan FileEvent)
- func GetStatesFromRecordFile() *file.FileStates
- func InitExtractorsFilesOffset()
- func LoadExtractors() []extractor
- func PersistFileStateInLocal(state file.FileState)
- func ReWriteRecordFile(fileStates *file.FileStates) error
- func ReloadExtractors()
- func UpdateFileStateFileName(fileStates *file.FileStates, extractors []extractor) (newFileStates *file.FileStates)
- type Collector
- type ErrorResponse
- type ErrorResponseMessage
- type Event
- type FileEvent
- type LogEventMessage
- type MetaData_
- type Recorder
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var Extractors []extractor
View Source
var WindowsOsLogRecord *windowslog.WindowsOsLogRecorder
Functions ¶
func CleanInvalidStatesInLocal ¶
func CleanInvalidStatesInLocal()
Clean the invalid states in Record to upgrade the performance
func CreateExtractors ¶
func CreateExtractors()
func GetStatesFromRecordFile ¶
func GetStatesFromRecordFile() *file.FileStates
decode the states from local record file
func InitExtractorsFilesOffset ¶
func InitExtractorsFilesOffset()
func LoadExtractors ¶
func LoadExtractors() []extractor
func PersistFileStateInLocal ¶
backup the record file into local
func ReWriteRecordFile ¶
func ReWriteRecordFile(fileStates *file.FileStates) error
write the new states into the local Record file
func ReloadExtractors ¶
func ReloadExtractors()
func UpdateFileStateFileName ¶
func UpdateFileStateFileName(fileStates *file.FileStates, extractors []extractor) (newFileStates *file.FileStates)
update attribute filePath in FileState
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Message ErrorResponseMessage `json:"message"`
}
type ErrorResponseMessage ¶
type Event ¶
type FileEvent ¶
type FileEvent struct { IsWindowsOsLog bool WindowsOsLogChannelState windowslog.WindowsOsLogChannelState FileState file.FileState LogEvent LogEventMessage Offset uint64 //读取后的offset ErrRes ErrorResponse ResponseStr string ResStatusCode int SuccessPreProcessLogEvent bool //before send to server,log need to be marshaled and compressed,it's flaged the status }
func (*FileEvent) SendLogDataToServer ¶
func (fileEvent *FileEvent) SendLogDataToServer()
send the log event from file event to server
type LogEventMessage ¶
type LogEventMessage struct { LogEvents []Event `json:"log_events" required:"true" len:"20"` LogTopicId string `json:"log_topic_id" required:"true"` LogGroupId string `json:"log_group_id" required:"true"` }
func (*LogEventMessage) Validate ¶
func (e *LogEventMessage) Validate() error
validate log event message
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
var Record Recorder
func (*Recorder) FileStateExistInRecord ¶
if oldstate exist in memory,then return ,whether return {}
func (*Recorder) UpdateRecord ¶
backup the record file into local update record file when success to send a log request to server
func (*Recorder) UpdateState ¶
update State in Mem
Click to show internal directories.
Click to hide internal directories.