grpc_ping_go

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

README

grpc-ping-go

A repository containing the ping example protos generated with GPM

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_ping_entities_proto protoreflect.FileDescriptor
View Source
var File_ping_services_proto protoreflect.FileDescriptor

Functions

func RegisterPingServer

func RegisterPingServer(s *grpc.Server, srv PingServer)

Types

type PingClient

type PingClient interface {
	// Ping sends a ping message
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error)
}

PingClient is the client API for Ping service.

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

func NewPingClient

func NewPingClient(cc grpc.ClientConnInterface) PingClient

type PingRequest

type PingRequest struct {

	// Message to send with the ping request.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

The ping request.

func (*PingRequest) Descriptor deprecated

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) GetMessage

func (x *PingRequest) GetMessage() string

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect

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

func (*PingRequest) Reset

func (x *PingRequest) Reset()

func (*PingRequest) String

func (x *PingRequest) String() string

func (*PingRequest) Validate

func (m *PingRequest) Validate() error

Validate checks the field values on PingRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type PingRequestValidationError

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

PingRequestValidationError is the validation error returned by PingRequest.Validate if the designated constraints aren't met.

func (PingRequestValidationError) Cause

Cause function returns cause value.

func (PingRequestValidationError) Error

Error satisfies the builtin error interface

func (PingRequestValidationError) ErrorName

func (e PingRequestValidationError) ErrorName() string

ErrorName returns error name.

func (PingRequestValidationError) Field

Field function returns field value.

func (PingRequestValidationError) Key

Key function returns key value.

func (PingRequestValidationError) Reason

Reason function returns reason value.

type PingServer

type PingServer interface {
	// Ping sends a ping message
	Ping(context.Context, *PingRequest) (*PongResponse, error)
}

PingServer is the server API for Ping service.

type PongResponse

type PongResponse struct {

	// Message with the pong answer.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

The pong response.

func (*PongResponse) Descriptor deprecated

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

Deprecated: Use PongResponse.ProtoReflect.Descriptor instead.

func (*PongResponse) GetMessage

func (x *PongResponse) GetMessage() string

func (*PongResponse) ProtoMessage

func (*PongResponse) ProtoMessage()

func (*PongResponse) ProtoReflect

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

func (*PongResponse) Reset

func (x *PongResponse) Reset()

func (*PongResponse) String

func (x *PongResponse) String() string

func (*PongResponse) Validate

func (m *PongResponse) Validate() error

Validate checks the field values on PongResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type PongResponseValidationError

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

PongResponseValidationError is the validation error returned by PongResponse.Validate if the designated constraints aren't met.

func (PongResponseValidationError) Cause

Cause function returns cause value.

func (PongResponseValidationError) Error

Error satisfies the builtin error interface

func (PongResponseValidationError) ErrorName

func (e PongResponseValidationError) ErrorName() string

ErrorName returns error name.

func (PongResponseValidationError) Field

Field function returns field value.

func (PongResponseValidationError) Key

Key function returns key value.

func (PongResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedPingServer

type UnimplementedPingServer struct {
}

UnimplementedPingServer can be embedded to have forward compatible implementations.

func (*UnimplementedPingServer) Ping

Jump to

Keyboard shortcuts

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