proto

package
v0.0.0-...-77f4ceb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var File_health_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Health.ProtoReflect.Descriptor instead.

func (*Health) GetCounters

func (x *Health) GetCounters() map[string]int32

func (*Health) GetHearthbeat

func (x *Health) GetHearthbeat() *wrapperspb.BoolValue

func (*Health) GetMessages

func (x *Health) GetMessages() []*Message

func (*Health) GetMetrics

func (x *Health) GetMetrics() map[string]float64

func (*Health) GetStatus

func (x *Health) GetStatus() HealthStatus

func (*Health) GetTargetID

func (x *Health) GetTargetID() string

func (*Health) GetTargetType

func (x *Health) GetTargetType() string

func (*Health) GetTimestamp

func (x *Health) GetTimestamp() int64

func (*Health) ProtoMessage

func (*Health) ProtoMessage()

func (*Health) ProtoReflect

func (x *Health) ProtoReflect() protoreflect.Message

func (*Health) Reset

func (x *Health) Reset()

func (*Health) String

func (x *Health) String() string

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.

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) Enum

func (x HealthStatus) Enum() *HealthStatus

func (HealthStatus) EnumDescriptor deprecated

func (HealthStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use HealthStatus.Descriptor instead.

func (HealthStatus) Number

func (HealthStatus) String

func (x HealthStatus) String() string

func (HealthStatus) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetAffectHealth

func (x *Message) GetAffectHealth() bool

func (*Message) GetError

func (x *Message) GetError() string

func (*Message) GetStatus

func (x *Message) GetStatus() HealthStatus

func (*Message) GetSummary

func (x *Message) GetSummary() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Target.ProtoReflect.Descriptor instead.

func (*Target) GetCounters

func (x *Target) GetCounters() []string

func (*Target) GetHeartbeat

func (x *Target) GetHeartbeat() bool

func (*Target) GetID

func (x *Target) GetID() string

func (*Target) GetMetadata

func (x *Target) GetMetadata() map[string]string

func (*Target) GetMetrics

func (x *Target) GetMetrics() []string

func (*Target) GetTargetType

func (x *Target) GetTargetType() string

func (*Target) GetTotalCounters

func (x *Target) GetTotalCounters() []string

func (*Target) ProtoMessage

func (*Target) ProtoMessage()

func (*Target) ProtoReflect

func (x *Target) ProtoReflect() protoreflect.Message

func (*Target) Reset

func (x *Target) Reset()

func (*Target) String

func (x *Target) String() string

type UnimplementedHealthServiceServer

type UnimplementedHealthServiceServer struct {
}

UnimplementedHealthServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedHealthServiceServer) Push

func (UnimplementedHealthServiceServer) Register

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL