RefreshExternalCollectionState
A RefreshExternalCollectionState instance enumerates the possible states of a refresh external collection job.
go
type RefreshExternalCollectionState milvuspb
VALUES:
-
RefreshStatePending = RefreshExternalCollectionState(RefreshExternalCollectionState_RefreshPending)
The refresh job is pending.
-
RefreshStateInProgress = RefreshExternalCollectionState(RefreshExternalCollectionState_RefreshInProgress)
The refresh job is in progress.
-
RefreshStateCompleted = RefreshExternalCollectionState(RefreshExternalCollectionState_RefreshCompleted)
The refresh job has completed.
-
RefreshStateFailed = RefreshExternalCollectionState(RefreshExternalCollectionState_RefreshFailed)
The refresh job has failed.
Example
Demonstrates RefreshExternalCollectionState usage.
go
import (
"context"
"github.com/milvus-io/milvus/client/v3/milvusclient"
)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
cli, err := milvusclient.New(ctx, &milvusclient.ClientConfig{
Address: "YOUR_CLUSTER_ENDPOINT",
})
if err != nil {
// handle error
}
defer cli.Close(ctx)
jobs, err := cli.ListRefreshExternalCollectionJobs(ctx, milvusclient.NewListRefreshExternalCollectionJobsOption())
if err != nil {
// handle error
}
if jobs[0].State == milvusclient.RefreshStateInProgress {
fmt.Println("refresh still running")
}