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 ¶
- Variables
- type NewSyncJobClaim
- type Request
- type Response
- type SyncJobClaim
- func (r SyncJobClaim) Do(providedCtx context.Context) (*Response, error)
- func (r *SyncJobClaim) ErrorTrace(errortrace bool) *SyncJobClaim
- func (r *SyncJobClaim) FilterPath(filterpaths ...string) *SyncJobClaim
- func (r *SyncJobClaim) Header(key, value string) *SyncJobClaim
- func (r *SyncJobClaim) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *SyncJobClaim) Human(human bool) *SyncJobClaim
- func (r SyncJobClaim) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *SyncJobClaim) Pretty(pretty bool) *SyncJobClaim
- func (r *SyncJobClaim) Raw(raw io.Reader) *SyncJobClaim
- func (r *SyncJobClaim) Request(req *Request) *SyncJobClaim
- func (r *SyncJobClaim) SyncCursor(synccursor any) *SyncJobClaim
- func (r *SyncJobClaim) WorkerHostname(workerhostname string) *SyncJobClaim
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 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
type Response ¶
type Response struct { }
Response holds the response body struct for the package syncjobclaim
type SyncJobClaim ¶
type SyncJobClaim struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *SyncJobClaim
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 ¶
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 ¶
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