es

package
v0.0.0-...-6b33472 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ES

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

func NewClient

func NewClient() (*ES, error)

func (*ES) Task

func (e *ES) Task(ctx context.Context, id string) (*ESTaskResponse, error)

type ESConfig

type ESConfig struct {
	Username string `default:""`
	Password string `default:""`
	Endpoint string `default:"http://localhost:9200"`
}

type ESTaskResponse

type ESTaskResponse struct {
	Completed bool                    `json:"completed"`
	Task      ESTaskResponseTask      `json:"task"`
	Response  *ESTaskResponseResponse `json:"response"`
	Error     *ESTaskResponseError    `json:"error"`
}

type ESTaskResponseError

type ESTaskResponseError struct {
	Type   string `json:"type"`
	Reason int    `json:"reason"`
}

type ESTaskResponseResponse

type ESTaskResponseResponse struct {
	TimeOut bool   `json:"timed_out"`
	Total   uint64 `json:"total"`
}

type ESTaskResponseStatus

type ESTaskResponseStatus struct {
	Total   int `json:"total"`
	Updated int `json:"updated"`
	Created int `json:"created"`
	Deleted int `json:"deleted"`
	Batches int `json:"batches"`
}

type ESTaskResponseTask

type ESTaskResponseTask struct {
	Node               string               `json:"node"`
	ID                 int                  `json:"id"`
	Status             ESTaskResponseStatus `json:"status"`
	StartTimeInMillis  uint64               `json:"start_time_in_millis"`
	RunningTimeInNanos uint64               `json:"running_time_nanos"`
}

Jump to

Keyboard shortcuts

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