syncjobclaim

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

Claim a connector sync job. This action updates the job status to `in_progress` and sets the `last_seen` and `started_at` timestamps to the current time. Additionally, it can set the `sync_cursor` property for the sync job.

This API is not intended for direct connector management by users. It supports the implementation of services that utilize the connector protocol to communicate with Elasticsearch.

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 NewSyncJobClaim

type NewSyncJobClaim func(connectorsyncjobid string) *SyncJobClaim

NewSyncJobClaim type alias for index.

func NewSyncJobClaimFunc

func NewSyncJobClaimFunc(tp elastictransport.Interface) NewSyncJobClaim

NewSyncJobClaimFunc returns a new instance of SyncJobClaim 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 {

	// SyncCursor The cursor object from the last incremental sync job.
	// This should reference the `sync_cursor` field in the connector state for
	// which the job runs.
	SyncCursor json.RawMessage `json:"sync_cursor,omitempty"`
	// WorkerHostname The host name of the current system that will run the job.
	WorkerHostname string `json:"worker_hostname"`
}

Request holds the request body struct for the package syncjobclaim

https://github.com/elastic/elasticsearch-specification/blob/f6a370d0fba975752c644fc730f7c45610e28f36/specification/connector/sync_job_claim/SyncJobClaimRequest.ts#L23-L61

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

type Response

type Response struct {
}

Response holds the response body struct for the package syncjobclaim

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

func NewResponse

func NewResponse() *Response

NewResponse returns a Response

type SyncJobClaim

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

func New

Claim a connector sync job. This action updates the job status to `in_progress` and sets the `last_seen` and `started_at` timestamps to the current time. Additionally, it can set the `sync_cursor` property for the sync job.

This API is not intended for direct connector management by users. It supports the implementation of services that utilize the connector protocol to communicate with Elasticsearch.

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/claim-connector-sync-job-api.html

func (SyncJobClaim) Do

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

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

func (*SyncJobClaim) ErrorTrace

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

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

func (*SyncJobClaim) FilterPath

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

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

func (*SyncJobClaim) Header

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

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

func (*SyncJobClaim) HttpRequest

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

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

func (*SyncJobClaim) Human

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

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 (SyncJobClaim) Perform

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

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

func (*SyncJobClaim) Pretty

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

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

func (*SyncJobClaim) Raw

func (r *SyncJobClaim) Raw(raw io.Reader) *SyncJobClaim

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

func (*SyncJobClaim) Request

func (r *SyncJobClaim) Request(req *Request) *SyncJobClaim

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

func (*SyncJobClaim) SyncCursor

func (r *SyncJobClaim) SyncCursor(synccursor any) *SyncJobClaim

The cursor object from the last incremental sync job. This should reference the `sync_cursor` field in the connector state for which the job runs. API name: sync_cursor

func (*SyncJobClaim) WorkerHostname

func (r *SyncJobClaim) WorkerHostname(workerhostname string) *SyncJobClaim

The host name of the current system that will run the job. API name: worker_hostname

Jump to

Keyboard shortcuts

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