Skip to content

Commit

Permalink
Merge pull request #15 from spectrumjade/hec_interface
Browse files Browse the repository at this point in the history
Add WithContext methods to the HEC interface
  • Loading branch information
fuyufjh authored Apr 14, 2019
2 parents bc8861e + dd0f53c commit 10df423
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hec.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@ type HEC interface {
// WriteBatch writes multiple events via HCE batch mode
WriteBatch(events []*Event) error

// WriteBatchWithContext writes multiple events via HEC batch mode with a context for cancellation
WriteBatchWithContext(ctx context.Context, events []*Event) error

// WriteRaw writes raw data stream via HEC raw mode
WriteRaw(reader io.ReadSeeker, metadata *EventMetadata) error

// WriteRawWithContext writes raw data stream via HEC raw mode with a context for cancellation
WriteRawWithContext(ctx context.Context, reader io.ReadSeeker, metadata *EventMetadata) error

// WaitForAcknowledgement blocks until the Splunk indexer acknowledges data sent to it
WaitForAcknowledgement() error

Expand Down

0 comments on commit 10df423

Please sign in to comment.