DecoderAPI describes functionality of a decoder.
| 26 | |
| 27 | // DecoderAPI describes functionality of a decoder. |
| 28 | type DecoderAPI interface { |
| 29 | |
| 30 | // PostInitFunc is called after the decoder has been initialized |
| 31 | PostInitFunc() error |
| 32 | |
| 33 | // DeInitFunc is called prior to teardown |
| 34 | DeInitFunc() error |
| 35 | |
| 36 | // GetName returns the name of the decoder |
| 37 | GetName() string |
| 38 | |
| 39 | // SetWriter sets the netcap writer to use for the decoder |
| 40 | SetWriter(io.AuditRecordWriter) |
| 41 | |
| 42 | // GetWriter returns the current writer |
| 43 | GetWriter() io.AuditRecordWriter |
| 44 | |
| 45 | // GetType returns the netcap type of the decoder |
| 46 | GetType() types.Type |
| 47 | |
| 48 | // GetDescription returns the description of the decoder |
| 49 | GetDescription() string |
| 50 | |
| 51 | // GetChan returns a channel to receive serialized audit records from the decoder |
| 52 | GetChan() <-chan []byte |
| 53 | |
| 54 | // Destroy initiates teardown |
| 55 | Destroy() (string, int64) |
| 56 | |
| 57 | // NumRecords returns the number of processed audit records |
| 58 | NumRecords() int64 |
| 59 | |
| 60 | // FlushCurrentState writes the current state of accumulating records to disk |
| 61 | // without clearing the in-memory state. This is used during live capture |
| 62 | // to periodically make data visible while continuing to track state. |
| 63 | // Returns the number of records flushed. |
| 64 | FlushCurrentState() int64 |
| 65 | } |
no outgoing calls
no test coverage detected