Documentation ¶
Index ¶
- func CheckHealthRespWithErr(err error) *milvuspb.CheckHealthResponse
- func CheckHealthRespWithErrMsg(errMsg ...string) *milvuspb.CheckHealthResponse
- func WaitForComponentHealthy[T interface{ ... }](ctx context.Context, client T, serviceName string, attempts uint, ...) error
- func WaitForComponentInit[T interface{ ... }](ctx context.Context, client T, serviceName string, attempts uint, ...) error
- func WaitForComponentInitOrHealthy[T interface{ ... }](ctx context.Context, client T, serviceName string, attempts uint, ...) error
- func WaitForComponentStates[T interface{ ... }](ctx context.Context, client T, serviceName string, states []commonpb.StateCode, ...) error
- type ComponentStateService
- func (s *ComponentStateService) GetComponentStates(ctx context.Context, _ *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)
- func (s *ComponentStateService) OnAbnormal()
- func (s *ComponentStateService) OnHealthy()
- func (s *ComponentStateService) OnInitialized(nodeID int64)
- func (s *ComponentStateService) OnStopping()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckHealthRespWithErr ¶
func CheckHealthRespWithErr(err error) *milvuspb.CheckHealthResponse
func CheckHealthRespWithErrMsg ¶
func CheckHealthRespWithErrMsg(errMsg ...string) *milvuspb.CheckHealthResponse
func WaitForComponentHealthy ¶
func WaitForComponentHealthy[T interface { GetComponentStates(ctx context.Context, _ *milvuspb.GetComponentStatesRequest, opts ...grpc.CallOption) (*milvuspb.ComponentStates, error) }](ctx context.Context, client T, serviceName string, attempts uint, sleep time.Duration) error
WaitForComponentHealthy wait for component's state to be healthy
func WaitForComponentInit ¶
func WaitForComponentInit[T interface { GetComponentStates(ctx context.Context, _ *milvuspb.GetComponentStatesRequest, opts ...grpc.CallOption) (*milvuspb.ComponentStates, error) }](ctx context.Context, client T, serviceName string, attempts uint, sleep time.Duration) error
WaitForComponentInit wait for component's state to be initializing
func WaitForComponentInitOrHealthy ¶
func WaitForComponentInitOrHealthy[T interface { GetComponentStates(ctx context.Context, _ *milvuspb.GetComponentStatesRequest, opts ...grpc.CallOption) (*milvuspb.ComponentStates, error) }](ctx context.Context, client T, serviceName string, attempts uint, sleep time.Duration) error
WaitForComponentInitOrHealthy wait for component's state to be initializing or healthy
func WaitForComponentStates ¶
func WaitForComponentStates[T interface { GetComponentStates(ctx context.Context, _ *milvuspb.GetComponentStatesRequest, opts ...grpc.CallOption) (*milvuspb.ComponentStates, error) }](ctx context.Context, client T, serviceName string, states []commonpb.StateCode, attempts uint, sleep time.Duration) error
WaitForComponentStates wait for component's state to be one of the specific states
Types ¶
type ComponentStateService ¶
type ComponentStateService struct {
// contains filtered or unexported fields
}
ComponentStateService is a helper type to implement a GetComponentStates rpc at server side. StandBy -> Initializing -> Healthy -> Abnormal -> Healthy All can transfer into Stopping
func NewComponentStateService ¶
func NewComponentStateService(role string) *ComponentStateService
NewComponentStateService create a ComponentStateService
func (*ComponentStateService) GetComponentStates ¶
func (s *ComponentStateService) GetComponentStates(ctx context.Context, _ *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)
GetComponentStates get the component state of a milvus node.
func (*ComponentStateService) OnAbnormal ¶
func (s *ComponentStateService) OnAbnormal()
func (*ComponentStateService) OnHealthy ¶
func (s *ComponentStateService) OnHealthy()
func (*ComponentStateService) OnInitialized ¶
func (s *ComponentStateService) OnInitialized(nodeID int64)
func (*ComponentStateService) OnStopping ¶
func (s *ComponentStateService) OnStopping()
Click to show internal directories.
Click to hide internal directories.