Documentation
¶
Index ¶
- Variables
- func RegisterHealthServiceServer(s grpc.ServiceRegistrar, srv HealthServiceServer)
- type Health
- func (*Health) Descriptor() ([]byte, []int)deprecated
- func (x *Health) GetCounters() map[string]int32
- func (x *Health) GetHearthbeat() *wrapperspb.BoolValue
- func (x *Health) GetMessages() []*Message
- func (x *Health) GetMetrics() map[string]float64
- func (x *Health) GetStatus() HealthStatus
- func (x *Health) GetTargetID() string
- func (x *Health) GetTargetType() string
- func (x *Health) GetTimestamp() int64
- func (*Health) ProtoMessage()
- func (x *Health) ProtoReflect() protoreflect.Message
- func (x *Health) Reset()
- func (x *Health) String() string
- type HealthServiceClient
- type HealthServiceServer
- type HealthStatus
- func (HealthStatus) Descriptor() protoreflect.EnumDescriptor
- func (x HealthStatus) Enum() *HealthStatus
- func (HealthStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x HealthStatus) Number() protoreflect.EnumNumber
- func (x HealthStatus) String() string
- func (HealthStatus) Type() protoreflect.EnumType
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetAffectHealth() bool
- func (x *Message) GetError() string
- func (x *Message) GetStatus() HealthStatus
- func (x *Message) GetSummary() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type PushRequest
- type PushResponse
- type RegisterRequest
- type RegisterResponse
- type Target
- func (*Target) Descriptor() ([]byte, []int)deprecated
- func (x *Target) GetCounters() []string
- func (x *Target) GetHeartbeat() bool
- func (x *Target) GetID() string
- func (x *Target) GetMetadata() map[string]string
- func (x *Target) GetMetrics() []string
- func (x *Target) GetTargetType() string
- func (x *Target) GetTotalCounters() []string
- func (*Target) ProtoMessage()
- func (x *Target) ProtoReflect() protoreflect.Message
- func (x *Target) Reset()
- func (x *Target) String() string
- type UnimplementedHealthServiceServer
- type UnsafeHealthServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( HealthStatus_name = map[int32]string{ 0: "UNKNOWN", 1: "HEALTHY", 2: "DEGRADE", 3: "UNHEALTHY", } HealthStatus_value = map[string]int32{ "UNKNOWN": 0, "HEALTHY": 1, "DEGRADE": 2, "UNHEALTHY": 3, } )
Enum value maps for HealthStatus.
var File_health_proto protoreflect.FileDescriptor
var HealthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.HealthService", HandlerType: (*HealthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _HealthService_Register_Handler, }, { MethodName: "Push", Handler: _HealthService_Push_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "health.proto", }
HealthService_ServiceDesc is the grpc.ServiceDesc for HealthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHealthServiceServer ¶
func RegisterHealthServiceServer(s grpc.ServiceRegistrar, srv HealthServiceServer)
Types ¶
type Health ¶
type Health struct { TargetID string `protobuf:"bytes,1,opt,name=targetID,proto3" json:"targetID,omitempty"` TargetType string `protobuf:"bytes,2,opt,name=targetType,proto3" json:"targetType,omitempty"` Status HealthStatus `protobuf:"varint,3,opt,name=status,proto3,enum=proto.HealthStatus" json:"status,omitempty"` Hearthbeat *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=hearthbeat,proto3" json:"hearthbeat,omitempty"` Counters map[string]int32 `` /* 158-byte string literal not displayed */ Metrics map[string]float64 `` /* 157-byte string literal not displayed */ Messages []*Message `protobuf:"bytes,7,rep,name=messages,proto3" json:"messages,omitempty"` Timestamp int64 `protobuf:"varint,8,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*Health) Descriptor
deprecated
func (*Health) GetCounters ¶
func (*Health) GetHearthbeat ¶
func (x *Health) GetHearthbeat() *wrapperspb.BoolValue
func (*Health) GetMessages ¶
func (*Health) GetMetrics ¶
func (*Health) GetStatus ¶
func (x *Health) GetStatus() HealthStatus
func (*Health) GetTargetID ¶
func (*Health) GetTargetType ¶
func (*Health) GetTimestamp ¶
func (*Health) ProtoMessage ¶
func (*Health) ProtoMessage()
func (*Health) ProtoReflect ¶
func (x *Health) ProtoReflect() protoreflect.Message
type HealthServiceClient ¶
type HealthServiceClient interface { Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushResponse, error) }
HealthServiceClient is the client API for HealthService 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 NewHealthServiceClient ¶
func NewHealthServiceClient(cc grpc.ClientConnInterface) HealthServiceClient
type HealthServiceServer ¶
type HealthServiceServer interface { Register(context.Context, *RegisterRequest) (*RegisterResponse, error) Push(context.Context, *PushRequest) (*PushResponse, error) // contains filtered or unexported methods }
HealthServiceServer is the server API for HealthService service. All implementations must embed UnimplementedHealthServiceServer for forward compatibility
type HealthStatus ¶
type HealthStatus int32
const ( HealthStatus_UNKNOWN HealthStatus = 0 HealthStatus_HEALTHY HealthStatus = 1 HealthStatus_DEGRADE HealthStatus = 2 HealthStatus_UNHEALTHY HealthStatus = 3 )
func (HealthStatus) Descriptor ¶
func (HealthStatus) Descriptor() protoreflect.EnumDescriptor
func (HealthStatus) Enum ¶
func (x HealthStatus) Enum() *HealthStatus
func (HealthStatus) EnumDescriptor
deprecated
func (HealthStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use HealthStatus.Descriptor instead.
func (HealthStatus) Number ¶
func (x HealthStatus) Number() protoreflect.EnumNumber
func (HealthStatus) String ¶
func (x HealthStatus) String() string
func (HealthStatus) Type ¶
func (HealthStatus) Type() protoreflect.EnumType
type Message ¶
type Message struct { Summary string `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"` Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` AffectHealth bool `protobuf:"varint,3,opt,name=affectHealth,proto3" json:"affectHealth,omitempty"` Status HealthStatus `protobuf:"varint,4,opt,name=status,proto3,enum=proto.HealthStatus" json:"status,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) GetAffectHealth ¶
func (*Message) GetStatus ¶
func (x *Message) GetStatus() HealthStatus
func (*Message) GetSummary ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type PushRequest ¶
type PushRequest struct { Health []*Health `protobuf:"bytes,1,rep,name=health,proto3" json:"health,omitempty"` // contains filtered or unexported fields }
func (*PushRequest) Descriptor
deprecated
func (*PushRequest) Descriptor() ([]byte, []int)
Deprecated: Use PushRequest.ProtoReflect.Descriptor instead.
func (*PushRequest) GetHealth ¶
func (x *PushRequest) GetHealth() []*Health
func (*PushRequest) ProtoMessage ¶
func (*PushRequest) ProtoMessage()
func (*PushRequest) ProtoReflect ¶
func (x *PushRequest) ProtoReflect() protoreflect.Message
func (*PushRequest) Reset ¶
func (x *PushRequest) Reset()
func (*PushRequest) String ¶
func (x *PushRequest) String() string
type PushResponse ¶
type PushResponse struct {
// contains filtered or unexported fields
}
func (*PushResponse) Descriptor
deprecated
func (*PushResponse) Descriptor() ([]byte, []int)
Deprecated: Use PushResponse.ProtoReflect.Descriptor instead.
func (*PushResponse) ProtoMessage ¶
func (*PushResponse) ProtoMessage()
func (*PushResponse) ProtoReflect ¶
func (x *PushResponse) ProtoReflect() protoreflect.Message
func (*PushResponse) Reset ¶
func (x *PushResponse) Reset()
func (*PushResponse) String ¶
func (x *PushResponse) String() string
type RegisterRequest ¶
type RegisterRequest struct { Target []*Target `protobuf:"bytes,1,rep,name=target,proto3" json:"target,omitempty"` // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetTarget ¶
func (x *RegisterRequest) GetTarget() []*Target
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type RegisterResponse ¶
type RegisterResponse struct {
// contains filtered or unexported fields
}
func (*RegisterResponse) Descriptor
deprecated
func (*RegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
type Target ¶
type Target struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Metrics []string `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` Counters []string `protobuf:"bytes,3,rep,name=counters,proto3" json:"counters,omitempty"` TotalCounters []string `protobuf:"bytes,4,rep,name=totalCounters,proto3" json:"totalCounters,omitempty"` TargetType string `protobuf:"bytes,5,opt,name=targetType,proto3" json:"targetType,omitempty"` Metadata map[string]string `` /* 157-byte string literal not displayed */ Heartbeat bool `protobuf:"varint,7,opt,name=heartbeat,proto3" json:"heartbeat,omitempty"` // contains filtered or unexported fields }
func (*Target) Descriptor
deprecated
func (*Target) GetCounters ¶
func (*Target) GetHeartbeat ¶
func (*Target) GetMetadata ¶
func (*Target) GetMetrics ¶
func (*Target) GetTargetType ¶
func (*Target) GetTotalCounters ¶
func (*Target) ProtoMessage ¶
func (*Target) ProtoMessage()
func (*Target) ProtoReflect ¶
func (x *Target) ProtoReflect() protoreflect.Message
type UnimplementedHealthServiceServer ¶
type UnimplementedHealthServiceServer struct { }
UnimplementedHealthServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedHealthServiceServer) Push ¶
func (UnimplementedHealthServiceServer) Push(context.Context, *PushRequest) (*PushResponse, error)
func (UnimplementedHealthServiceServer) Register ¶
func (UnimplementedHealthServiceServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
type UnsafeHealthServiceServer ¶
type UnsafeHealthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeHealthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HealthServiceServer will result in compilation errors.