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 ¶
- Variables
- type NewSyncJobUpdateStats
- type Request
- type Response
- type SyncJobUpdateStats
- func (r *SyncJobUpdateStats) DeletedDocumentCount(deleteddocumentcount int64) *SyncJobUpdateStats
- func (r SyncJobUpdateStats) Do(providedCtx context.Context) (*Response, error)
- func (r *SyncJobUpdateStats) ErrorTrace(errortrace bool) *SyncJobUpdateStats
- func (r *SyncJobUpdateStats) FilterPath(filterpaths ...string) *SyncJobUpdateStats
- func (r *SyncJobUpdateStats) Header(key, value string) *SyncJobUpdateStats
- func (r *SyncJobUpdateStats) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *SyncJobUpdateStats) Human(human bool) *SyncJobUpdateStats
- func (r *SyncJobUpdateStats) IndexedDocumentCount(indexeddocumentcount int64) *SyncJobUpdateStats
- func (r *SyncJobUpdateStats) IndexedDocumentVolume(indexeddocumentvolume int64) *SyncJobUpdateStats
- func (r *SyncJobUpdateStats) LastSeen(duration types.DurationVariant) *SyncJobUpdateStats
- func (r *SyncJobUpdateStats) Metadata(metadata types.MetadataVariant) *SyncJobUpdateStats
- func (r SyncJobUpdateStats) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *SyncJobUpdateStats) Pretty(pretty bool) *SyncJobUpdateStats
- func (r *SyncJobUpdateStats) Raw(raw io.Reader) *SyncJobUpdateStats
- func (r *SyncJobUpdateStats) Request(req *Request) *SyncJobUpdateStats
- func (r *SyncJobUpdateStats) TotalDocumentCount(totaldocumentcount int) *SyncJobUpdateStats
Constants ¶
This section is empty.
Variables ¶
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
func (*Request) UnmarshalJSON ¶
type Response ¶
type Response struct { }
Response holds the response body struct for the package syncjobupdatestats
type SyncJobUpdateStats ¶
type SyncJobUpdateStats struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *SyncJobUpdateStats
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.
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 ¶
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 ¶
func (r *SyncJobUpdateStats) LastSeen(duration types.DurationVariant) *SyncJobUpdateStats
The timestamp to use in the `last_seen` property for the connector sync job. API name: last_seen
func (*SyncJobUpdateStats) Metadata ¶
func (r *SyncJobUpdateStats) Metadata(metadata types.MetadataVariant) *SyncJobUpdateStats
The connector-specific metadata. API name: metadata
func (SyncJobUpdateStats) Perform ¶
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 ¶
func (r *SyncJobUpdateStats) Raw(raw io.Reader) *SyncJobUpdateStats
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