syncjobupdatestats

package
v8.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Set the connector sync job stats. Stats include: `deleted_document_count`, `indexed_document_count`, `indexed_document_volume`, and `total_document_count`. You can also update `last_seen`. This API is mainly used by the connector service for updating sync job information.

To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.

Index

Constants

This section is empty.

Variables

View Source
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")

ErrBuildPath is returned in case of missing parameters within the build of the request.

Functions

This section is empty.

Types

type NewSyncJobUpdateStats

type NewSyncJobUpdateStats func(connectorsyncjobid string) *SyncJobUpdateStats

NewSyncJobUpdateStats type alias for index.

func NewSyncJobUpdateStatsFunc

func NewSyncJobUpdateStatsFunc(tp elastictransport.Interface) NewSyncJobUpdateStats

NewSyncJobUpdateStatsFunc returns a new instance of SyncJobUpdateStats with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type Request

type Request struct {

	// DeletedDocumentCount The number of documents the sync job deleted.
	DeletedDocumentCount int64 `json:"deleted_document_count"`
	// IndexedDocumentCount The number of documents the sync job indexed.
	IndexedDocumentCount int64 `json:"indexed_document_count"`
	// IndexedDocumentVolume The total size of the data (in MiB) the sync job indexed.
	IndexedDocumentVolume int64 `json:"indexed_document_volume"`
	// LastSeen The timestamp to use in the `last_seen` property for the connector sync job.
	LastSeen types.Duration `json:"last_seen,omitempty"`
	// Metadata The connector-specific metadata.
	Metadata types.Metadata `json:"metadata,omitempty"`
	// TotalDocumentCount The total number of documents in the target index after the sync job
	// finished.
	TotalDocumentCount *int `json:"total_document_count,omitempty"`
}

Request holds the request body struct for the package syncjobupdatestats

https://github.com/elastic/elasticsearch-specification/blob/f6a370d0fba975752c644fc730f7c45610e28f36/specification/connector/sync_job_update_stats/SyncJobUpdateStatsRequest.ts#L24-L78

func NewRequest

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON

func (r *Request) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

func (*Request) UnmarshalJSON

func (s *Request) UnmarshalJSON(data []byte) error

type Response

type Response struct {
}

Response holds the response body struct for the package syncjobupdatestats

https://github.com/elastic/elasticsearch-specification/blob/f6a370d0fba975752c644fc730f7c45610e28f36/specification/connector/sync_job_update_stats/SyncJobUpdateStatsResponse.ts#L20-L22

func NewResponse

func NewResponse() *Response

NewResponse returns a Response

type SyncJobUpdateStats

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

func New

Set the connector sync job stats. Stats include: `deleted_document_count`, `indexed_document_count`, `indexed_document_volume`, and `total_document_count`. You can also update `last_seen`. This API is mainly used by the connector service for updating sync job information.

To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.

https://www.elastic.co/guide/en/elasticsearch/reference/current/set-connector-sync-job-stats-api.html

func (*SyncJobUpdateStats) DeletedDocumentCount

func (r *SyncJobUpdateStats) DeletedDocumentCount(deleteddocumentcount int64) *SyncJobUpdateStats

The number of documents the sync job deleted. API name: deleted_document_count

func (SyncJobUpdateStats) Do

func (r SyncJobUpdateStats) Do(providedCtx context.Context) (*Response, error)

Do runs the request through the transport, handle the response and returns a syncjobupdatestats.Response

func (*SyncJobUpdateStats) ErrorTrace

func (r *SyncJobUpdateStats) ErrorTrace(errortrace bool) *SyncJobUpdateStats

ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace

func (*SyncJobUpdateStats) FilterPath

func (r *SyncJobUpdateStats) FilterPath(filterpaths ...string) *SyncJobUpdateStats

FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path

func (*SyncJobUpdateStats) Header

func (r *SyncJobUpdateStats) Header(key, value string) *SyncJobUpdateStats

Header set a key, value pair in the SyncJobUpdateStats headers map.

func (*SyncJobUpdateStats) HttpRequest

func (r *SyncJobUpdateStats) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (*SyncJobUpdateStats) Human

func (r *SyncJobUpdateStats) Human(human bool) *SyncJobUpdateStats

Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human

func (*SyncJobUpdateStats) IndexedDocumentCount

func (r *SyncJobUpdateStats) IndexedDocumentCount(indexeddocumentcount int64) *SyncJobUpdateStats

The number of documents the sync job indexed. API name: indexed_document_count

func (*SyncJobUpdateStats) IndexedDocumentVolume

func (r *SyncJobUpdateStats) IndexedDocumentVolume(indexeddocumentvolume int64) *SyncJobUpdateStats

The total size of the data (in MiB) the sync job indexed. API name: indexed_document_volume

func (*SyncJobUpdateStats) LastSeen

The timestamp to use in the `last_seen` property for the connector sync job. API name: last_seen

func (*SyncJobUpdateStats) Metadata

The connector-specific metadata. API name: metadata

func (SyncJobUpdateStats) Perform

func (r SyncJobUpdateStats) Perform(providedCtx context.Context) (*http.Response, error)

Perform runs the http.Request through the provided transport and returns an http.Response.

func (*SyncJobUpdateStats) Pretty

func (r *SyncJobUpdateStats) Pretty(pretty bool) *SyncJobUpdateStats

Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty

func (*SyncJobUpdateStats) Raw

Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.

func (*SyncJobUpdateStats) Request

func (r *SyncJobUpdateStats) Request(req *Request) *SyncJobUpdateStats

Request allows to set the request property with the appropriate payload.

func (*SyncJobUpdateStats) TotalDocumentCount

func (r *SyncJobUpdateStats) TotalDocumentCount(totaldocumentcount int) *SyncJobUpdateStats

The total number of documents in the target index after the sync job finished. API name: total_document_count

Jump to

Keyboard shortcuts

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