health

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Status_name = map[int32]string{
		0: "UNKNOWN",
		1: "HEALTHY",
		2: "UNHEALTHY",
	}
	Status_value = map[string]int32{
		"UNKNOWN":   0,
		"HEALTHY":   1,
		"UNHEALTHY": 2,
	}
)

Enum value maps for Status.

View Source
var File_health_health_proto protoreflect.FileDescriptor

Functions

func RegisterHealthServer

func RegisterHealthServer(s *grpc.Server, srv HealthServer)

Types

type HealthClient

type HealthClient interface {
	HealthStream(ctx context.Context, opts ...grpc.CallOption) (Health_HealthStreamClient, error)
}

HealthClient is the client API for Health service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewHealthClient

func NewHealthClient(cc grpc.ClientConnInterface) HealthClient

type HealthServer

type HealthServer interface {
	HealthStream(Health_HealthStreamServer) error
}

HealthServer is the server API for Health service.

type Health_HealthStreamClient

type Health_HealthStreamClient interface {
	Send(*NodeStatus) error
	Recv() (*empty.Empty, error)
	grpc.ClientStream
}

type Health_HealthStreamServer

type Health_HealthStreamServer interface {
	Send(*empty.Empty) error
	Recv() (*NodeStatus, error)
	grpc.ServerStream
}

type NodeStatus

type NodeStatus struct {
	NodeUuid string `protobuf:"bytes,1,opt,name=node_uuid,json=nodeUuid,proto3" json:"node_uuid,omitempty"`
	Status   Status `protobuf:"varint,2,opt,name=Status,proto3,enum=apate.health.Status" json:"Status,omitempty"`
	// contains filtered or unexported fields
}

The message an Apatelet will stream to the control plane informing it about its status

func (*NodeStatus) Descriptor deprecated

func (*NodeStatus) Descriptor() ([]byte, []int)

Deprecated: Use NodeStatus.ProtoReflect.Descriptor instead.

func (*NodeStatus) GetNodeUuid

func (x *NodeStatus) GetNodeUuid() string

func (*NodeStatus) GetStatus

func (x *NodeStatus) GetStatus() Status

func (*NodeStatus) ProtoMessage

func (*NodeStatus) ProtoMessage()

func (*NodeStatus) ProtoReflect

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

func (*NodeStatus) Reset

func (x *NodeStatus) Reset()

func (*NodeStatus) String

func (x *NodeStatus) String() string

type Status

type Status int32

The various states that an Apatelet may be

const (
	Status_UNKNOWN   Status = 0 // Unknown state: no communication or still starting up
	Status_HEALTHY   Status = 1 // When everything is fine
	Status_UNHEALTHY Status = 2 // When an apatelet is encountering errors but not down
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

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

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type UnimplementedHealthServer

type UnimplementedHealthServer struct {
}

UnimplementedHealthServer can be embedded to have forward compatible implementations.

func (*UnimplementedHealthServer) HealthStream

Directories

Path Synopsis
Package mock_health is a generated GoMock package.
Package mock_health is a generated GoMock package.

Jump to

Keyboard shortcuts

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