Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterHealthServer(s grpc.ServiceRegistrar, srv HealthServer)
- type HealthCheckRequest
- func (*HealthCheckRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HealthCheckRequest) GetComponent() string
- func (x *HealthCheckRequest) GetHops() []string
- func (*HealthCheckRequest) ProtoMessage()
- func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message
- func (x *HealthCheckRequest) Reset()
- func (x *HealthCheckRequest) String() string
- type HealthCheckResponse
- func (*HealthCheckResponse) Descriptor() ([]byte, []int)deprecated
- func (s *HealthCheckResponse) Flatten(parent string) (components []*HealthCheckResponse)
- func (x *HealthCheckResponse) GetComponents() []*HealthCheckResponse
- func (x *HealthCheckResponse) GetDetails() []*anypb.Any
- func (x *HealthCheckResponse) GetDuration() *durationpb.Duration
- func (x *HealthCheckResponse) GetMessage() string
- func (x *HealthCheckResponse) GetName() string
- func (x *HealthCheckResponse) GetServerId() string
- func (x *HealthCheckResponse) GetStatus() Status
- func (x *HealthCheckResponse) GetType() string
- func (s *HealthCheckResponse) Healthy() *HealthCheckResponse
- func (s *HealthCheckResponse) IsHealthy() error
- func (s *HealthCheckResponse) LogStatus(log *slog.Logger)
- func (*HealthCheckResponse) ProtoMessage()
- func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message
- func (x *HealthCheckResponse) Reset()
- func (x *HealthCheckResponse) String() string
- func (s *HealthCheckResponse) Unhealthy(msg string) *HealthCheckResponse
- type HealthClient
- type HealthServer
- type Status
- type UnhealthyError
- type UnimplementedHealthServer
- type UnsafeHealthServer
Constants ¶
const (
Health_Check_FullMethodName = "/platform_health.v1.Health/Check"
)
Variables ¶
var ( Status_name = map[int32]string{ 0: "UNKNOWN", 1: "HEALTHY", 2: "UNHEALTHY", 3: "LOOP_DETECTED", } Status_value = map[string]int32{ "UNKNOWN": 0, "HEALTHY": 1, "UNHEALTHY": 2, "LOOP_DETECTED": 3, } )
Enum value maps for Status.
var File_proto_platform_health_proto protoreflect.FileDescriptor
var Health_ServiceDesc = grpc.ServiceDesc{ ServiceName: "platform_health.v1.Health", HandlerType: (*HealthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Check", Handler: _Health_Check_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/platform_health.proto", }
Health_ServiceDesc is the grpc.ServiceDesc for Health service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHealthServer ¶
func RegisterHealthServer(s grpc.ServiceRegistrar, srv HealthServer)
Types ¶
type HealthCheckRequest ¶
type HealthCheckRequest struct { // allow specification of restricted subset of components to validate Component string `protobuf:"bytes,1,opt,name=component,proto3" json:"component,omitempty"` // TODO: define syntax for specifying component Hops []string `protobuf:"bytes,2,rep,name=hops,proto3" json:"hops,omitempty"` // list of server IDs for loop detection // contains filtered or unexported fields }
func (*HealthCheckRequest) Descriptor
deprecated
func (*HealthCheckRequest) Descriptor() ([]byte, []int)
Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.
func (*HealthCheckRequest) GetComponent ¶ added in v0.2.0
func (x *HealthCheckRequest) GetComponent() string
func (*HealthCheckRequest) GetHops ¶ added in v0.2.0
func (x *HealthCheckRequest) GetHops() []string
func (*HealthCheckRequest) ProtoMessage ¶
func (*HealthCheckRequest) ProtoMessage()
func (*HealthCheckRequest) ProtoReflect ¶
func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message
func (*HealthCheckRequest) Reset ¶
func (x *HealthCheckRequest) Reset()
func (*HealthCheckRequest) String ¶
func (x *HealthCheckRequest) String() string
type HealthCheckResponse ¶
type HealthCheckResponse struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // e.g. "tcp", "rest", "grpc", "kafka", "s3" Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // instance name ServerId *string `protobuf:"bytes,3,opt,name=serverId,proto3,oneof" json:"serverId,omitempty"` // unique identifier for server/satellite instance Status Status `protobuf:"varint,4,opt,name=status,proto3,enum=platform_health.v1.Status" json:"status,omitempty"` Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"` Details []*anypb.Any `protobuf:"bytes,6,rep,name=details,proto3" json:"details,omitempty"` Components []*HealthCheckResponse `protobuf:"bytes,7,rep,name=components,proto3" json:"components,omitempty"` Duration *durationpb.Duration `protobuf:"bytes,8,opt,name=duration,proto3" json:"duration,omitempty"` // contains filtered or unexported fields }
func (*HealthCheckResponse) Descriptor
deprecated
func (*HealthCheckResponse) Descriptor() ([]byte, []int)
Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.
func (*HealthCheckResponse) Flatten ¶
func (s *HealthCheckResponse) Flatten(parent string) (components []*HealthCheckResponse)
func (*HealthCheckResponse) GetComponents ¶
func (x *HealthCheckResponse) GetComponents() []*HealthCheckResponse
func (*HealthCheckResponse) GetDetails ¶
func (x *HealthCheckResponse) GetDetails() []*anypb.Any
func (*HealthCheckResponse) GetDuration ¶
func (x *HealthCheckResponse) GetDuration() *durationpb.Duration
func (*HealthCheckResponse) GetMessage ¶
func (x *HealthCheckResponse) GetMessage() string
func (*HealthCheckResponse) GetName ¶
func (x *HealthCheckResponse) GetName() string
func (*HealthCheckResponse) GetServerId ¶ added in v0.2.0
func (x *HealthCheckResponse) GetServerId() string
func (*HealthCheckResponse) GetStatus ¶
func (x *HealthCheckResponse) GetStatus() Status
func (*HealthCheckResponse) GetType ¶
func (x *HealthCheckResponse) GetType() string
func (*HealthCheckResponse) Healthy ¶
func (s *HealthCheckResponse) Healthy() *HealthCheckResponse
func (*HealthCheckResponse) IsHealthy ¶ added in v0.4.1
func (s *HealthCheckResponse) IsHealthy() error
func (*HealthCheckResponse) LogStatus ¶
func (s *HealthCheckResponse) LogStatus(log *slog.Logger)
func (*HealthCheckResponse) ProtoMessage ¶
func (*HealthCheckResponse) ProtoMessage()
func (*HealthCheckResponse) ProtoReflect ¶
func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message
func (*HealthCheckResponse) Reset ¶
func (x *HealthCheckResponse) Reset()
func (*HealthCheckResponse) String ¶
func (x *HealthCheckResponse) String() string
func (*HealthCheckResponse) Unhealthy ¶
func (s *HealthCheckResponse) Unhealthy(msg string) *HealthCheckResponse
type HealthClient ¶
type HealthClient interface {
Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
}
HealthClient is the client API for Health service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewHealthClient ¶
func NewHealthClient(cc grpc.ClientConnInterface) HealthClient
type HealthServer ¶
type HealthServer interface { Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) // contains filtered or unexported methods }
HealthServer is the server API for Health service. All implementations must embed UnimplementedHealthServer for forward compatibility.
type Status ¶
type Status int32
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type UnhealthyError ¶ added in v0.4.1
type UnhealthyError struct{}
func (*UnhealthyError) Error ¶ added in v0.4.1
func (e *UnhealthyError) Error() string
type UnimplementedHealthServer ¶
type UnimplementedHealthServer struct{}
UnimplementedHealthServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedHealthServer) Check ¶
func (UnimplementedHealthServer) Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
type UnsafeHealthServer ¶
type UnsafeHealthServer interface {
// contains filtered or unexported methods
}
UnsafeHealthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HealthServer will result in compilation errors.