v1

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ETagHeader = "ETag"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New added in v0.16.1

func New(searchReindexAPIURL, serviceToken string) *Client

New creates a new instance of Client with a given search reindex api url

func NewWithHealthClient added in v0.16.1

func NewWithHealthClient(serviceToken string, hcCli *healthcheck.Client) (*Client, error)

NewWithHealthClient creates a new instance of SearchReindexAPI Client, reusing the URL and Clienter from the provided healthcheck client

func (*Client) Checker

func (cli *Client) Checker(ctx context.Context, check *health.CheckState) error

Checker calls search reindex api health endpoint and returns a check object to the caller

func (*Client) GetJob added in v0.20.0

func (cli *Client) GetJob(ctx context.Context, reqheader client.Headers, jobID string) (*client.RespHeaders, *models.Job, error)

GetJob Get the specific search reindex job that has the id given in the path.

func (*Client) GetJobs added in v0.20.0

func (cli *Client) GetJobs(ctx context.Context, reqheader client.Headers, options client.Options) (*client.RespHeaders, *models.Jobs, error)

func (*Client) GetTask added in v0.18.0

func (cli *Client) GetTask(ctx context.Context, reqHeaders client.Headers, jobID, taskName string) (*client.RespHeaders, *models.Task, error)

GetTask Get a specific task for a given reindex job

func (*Client) GetTasks added in v0.20.0

func (cli *Client) GetTasks(ctx context.Context, reqHeaders client.Headers, jobID string) (*client.RespHeaders, *models.Tasks, error)

GetTasks Get all tasks for a given reindex job

func (*Client) Health added in v0.16.1

func (cli *Client) Health() *healthcheck.Client

Health returns the underlying Healthcheck Client for this search reindex API client

func (*Client) PatchJob added in v0.17.0

func (cli *Client) PatchJob(ctx context.Context, reqHeaders client.Headers, jobID string, patchList []client.PatchOperation) (*client.RespHeaders, error)

PatchJob applies the patch operations, provided in the body, to the job with id = jobID It returns the ETag from the response header

func (*Client) PostJob

func (cli *Client) PostJob(ctx context.Context, reqHeaders client.Headers) (*client.RespHeaders, *models.Job, error)

PostJob creates a new reindex job for processing

func (*Client) PostTask added in v0.19.0

func (cli *Client) PostTask(ctx context.Context, reqHeaders client.Headers, jobID string, taskToCreate models.TaskToCreate) (*client.RespHeaders, *models.Task, error)

PostTask creates or updates a task, for the job with id = jobID, containing the number of documents to be processed

func (*Client) PutJobNumberOfTasks added in v0.20.0

func (cli *Client) PutJobNumberOfTasks(ctx context.Context, reqHeaders client.Headers, jobID, numTasks string) (*client.RespHeaders, error)

PutJobNumberOfTasks updates the number of tasks field, with the provided count, for the job specified by the provided jobID.

func (*Client) PutTaskNumberOfDocs added in v0.24.0

func (cli *Client) PutTaskNumberOfDocs(ctx context.Context, reqHeaders client.Headers, jobID, taskName, docCount string) (*client.RespHeaders, error)

PutTaskNumberOfDocs updates the number of documents, with the provided count, for a task associated with the job specified by the jobID.

func (*Client) URL added in v0.16.1

func (cli *Client) URL() string

URL returns the URL used by this client

func (*Client) ValidateOptions added in v0.20.0

func (cli *Client) ValidateOptions(option int) (validOption string, err error)

Jump to

Keyboard shortcuts

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