ListRefreshExternalCollectionJobs()
This operation lists the external collection refresh jobs of all or specified collections.
func (c *Client) ListRefreshExternalCollectionJobs(ctx context.Context, option ListRefreshExternalCollectionJobsOption, callOptions ...grpc.CallOption) ([]*entity.RefreshExternalCollectionJobInfo, error)
Request Syntax
Creates the request for ListRefreshExternalCollectionJobs().
option := client.NewListRefreshExternalCollectionJobsOption(collectionName)
result, err := client.ListRefreshExternalCollectionJobs(option)
PARAMETERS:
-
collectionName (string) -
[REQUIRED]
The name of the target collection. If this parameter is left unspecified, the refresh jobs of all external collections are turned.
RETURN TYPE:
[]*entity.RefreshExternalCollectionJobInfo
RETURNS:
A list of entity.RefreshExternalCollectionJobInfo struct, each recording the details of the an external collection refresh job.
PARAMETERS:
-
JobID (int64) -
The unique identifier of the refresh job.
-
CollectionName (string) -
The name of the collection being refreshed.
-
State (RefreshExternalCollectionState) -
The current state of the refresh job.
-
Progress (int64) -
The progress percentage of the refresh job.
-
Reason (string) -
Additional information or reason for the current state.
-
ExternalSource (string) -
The external data source identifier.
-
ExternalSpec (string) -
The external data source specification (JSON), describing the file format and object storage settings.
-
StartTime (int64) -
The Unix timestamp when the job started.
-
EndTime (int64) -
The Unix timestamp when the job completed.
ERROR HANDLING:
-
error
Validation, request construction, or the RPC fails. Check the returned error for failure details.
Example
Demonstrates ListRefreshExternalCollectionJobs() usage.
// List refresh jobs of a specified collection
option := client.NewListRefreshExternalCollectionJobsOption("test_collection")
result, err = client.ListRefreshExternalCollectionJobs(option)