output

package
v0.0.0-...-bdd0e8b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ElasticsearchRetrier

type ElasticsearchRetrier struct {
	// contains filtered or unexported fields
}

func NewElasticsearchRetrier

func NewElasticsearchRetrier(retry int) *ElasticsearchRetrier

func (*ElasticsearchRetrier) Retry

func (r *ElasticsearchRetrier) Retry(ctx context.Context, retry int, req *http.Request, resp *http.Response, err error) (time.Duration, bool, error)

type Output

type Output struct {
	*elastic.Client
	Bulk      *elastic.BulkService
	Parameter Parameter
	// contains filtered or unexported fields
}

func NewOutput

func NewOutput(parameter Parameter) (*Output, error)

func (*Output) AddBuffer

func (c *Output) AddBuffer(data interface{})

func (*Output) BufferLimit

func (c *Output) BufferLimit() int

func (*Output) BufferSize

func (c *Output) BufferSize() int

func (*Output) Close

func (c *Output) Close()

func (*Output) GenerateTimeIndex

func (c *Output) GenerateTimeIndex() string

func (*Output) IsClose

func (c *Output) IsClose() bool

func (*Output) Send

func (c *Output) Send() error

type Parameter

type Parameter struct {
	Addr        []string
	BulkLimit   int
	Retry       int
	IndexPrefix string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL