powergate: github.com/textileio/powergate/health/rpc Index | Files

package rpc

import "github.com/textileio/powergate/health/rpc"

Index

Package Files

rpc.go rpc.pb.go

Variables

var (
    Status_name = map[int32]string{
        0:  "STATUS_UNSPECIFIED",
        1:  "STATUS_OK",
        2:  "STATUS_DEGRADED",
        3:  "STATUS_ERROR",
    }
    Status_value = map[string]int32{
        "STATUS_UNSPECIFIED": 0,
        "STATUS_OK":          1,
        "STATUS_DEGRADED":    2,
        "STATUS_ERROR":       3,
    }
)

Enum value maps for Status.

var File_health_rpc_rpc_proto protoreflect.FileDescriptor

func RegisterRPCServiceServer Uses

func RegisterRPCServiceServer(s *grpc.Server, srv RPCServiceServer)

type CheckRequest Uses

type CheckRequest struct {
    // contains filtered or unexported fields
}

func (*CheckRequest) Descriptor Uses

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

Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead.

func (*CheckRequest) ProtoMessage Uses

func (*CheckRequest) ProtoMessage()

func (*CheckRequest) ProtoReflect Uses

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

func (*CheckRequest) Reset Uses

func (x *CheckRequest) Reset()

func (*CheckRequest) String Uses

func (x *CheckRequest) String() string

type CheckResponse Uses

type CheckResponse struct {
    Status   Status   `protobuf:"varint,1,opt,name=status,proto3,enum=health.rpc.Status" json:"status,omitempty"`
    Messages []string `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
    // contains filtered or unexported fields
}

func (*CheckResponse) Descriptor Uses

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

Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead.

func (*CheckResponse) GetMessages Uses

func (x *CheckResponse) GetMessages() []string

func (*CheckResponse) GetStatus Uses

func (x *CheckResponse) GetStatus() Status

func (*CheckResponse) ProtoMessage Uses

func (*CheckResponse) ProtoMessage()

func (*CheckResponse) ProtoReflect Uses

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

func (*CheckResponse) Reset Uses

func (x *CheckResponse) Reset()

func (*CheckResponse) String Uses

func (x *CheckResponse) String() string

type RPC Uses

type RPC struct {
    UnimplementedRPCServiceServer
    // contains filtered or unexported fields
}

RPC implements the rpc service.

func New Uses

func New(m *health.Module) *RPC

New creates a new rpc service.

func (*RPC) Check Uses

func (a *RPC) Check(ctx context.Context, req *CheckRequest) (*CheckResponse, error)

Check calls module.Check.

type RPCServiceClient Uses

type RPCServiceClient interface {
    Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
}

RPCServiceClient is the client API for RPCService service.

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

func NewRPCServiceClient Uses

func NewRPCServiceClient(cc grpc.ClientConnInterface) RPCServiceClient

type RPCServiceServer Uses

type RPCServiceServer interface {
    Check(context.Context, *CheckRequest) (*CheckResponse, error)
}

RPCServiceServer is the server API for RPCService service.

type Status Uses

type Status int32
const (
    Status_STATUS_UNSPECIFIED Status = 0
    Status_STATUS_OK          Status = 1
    Status_STATUS_DEGRADED    Status = 2
    Status_STATUS_ERROR       Status = 3
)

func (Status) Descriptor Uses

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum Uses

func (x Status) Enum() *Status

func (Status) EnumDescriptor Uses

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

Deprecated: Use Status.Descriptor instead.

func (Status) Number Uses

func (x Status) Number() protoreflect.EnumNumber

func (Status) String Uses

func (x Status) String() string

func (Status) Type Uses

func (Status) Type() protoreflect.EnumType

type UnimplementedRPCServiceServer Uses

type UnimplementedRPCServiceServer struct {
}

UnimplementedRPCServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedRPCServiceServer) Check Uses

func (*UnimplementedRPCServiceServer) Check(context.Context, *CheckRequest) (*CheckResponse, error)

Package rpc imports 10 packages (graph) and is imported by 6 packages. Updated 2020-09-21. Refresh now. Tools for package owners.