pingpong

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pingpong_proto protoreflect.FileDescriptor

Functions

func NewPingPongServer

func NewPingPongServer(handler PingPong, opts ...PingPongServerOption) http.Handler

Types

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type PingPong

type PingPong interface {
	Ping(context.Context, *PingRequest) (*PongReply, error)
	NoPing(context.Context, *Empty) (*PongReply, error)
}

type PingPongClient

type PingPongClient struct {
	ranger.Client
	// contains filtered or unexported fields
}

func NewPingPongClient

func NewPingPongClient(addr string, client ranger.HTTPClient, plugins ...ranger.ClientPlugin) (*PingPongClient, error)

func (*PingPongClient) NoPing

func (c *PingPongClient) NoPing(ctx context.Context, in *Empty) (*PongReply, error)

func (*PingPongClient) Ping

func (c *PingPongClient) Ping(ctx context.Context, in *PingRequest) (*PongReply, error)

type PingPongServer

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

func (*PingPongServer) NoPing

func (p *PingPongServer) NoPing(ctx context.Context, reqBytes *[]byte) (pb.Message, error)

func (*PingPongServer) Ping

func (p *PingPongServer) Ping(ctx context.Context, reqBytes *[]byte) (pb.Message, error)

type PingPongServerOption

type PingPongServerOption func(s *PingPongServer)

func WithUnknownFieldsForPingPongServer

func WithUnknownFieldsForPingPongServer() PingPongServerOption

type PingPongServiceImpl

type PingPongServiceImpl struct{}

implement the service handler for PingPong service

func (*PingPongServiceImpl) NoPing

func (s *PingPongServiceImpl) NoPing(ctx context.Context, in *Empty) (*PongReply, error)

func (*PingPongServiceImpl) Ping

type PingRequest

type PingRequest struct {
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// contains filtered or unexported fields
}

func (*PingRequest) Descriptor deprecated

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) GetSender

func (x *PingRequest) GetSender() 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

type PongReply

type PongReply struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*PongReply) Descriptor deprecated

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

Deprecated: Use PongReply.ProtoReflect.Descriptor instead.

func (*PongReply) GetMessage

func (x *PongReply) GetMessage() string

func (*PongReply) ProtoMessage

func (*PongReply) ProtoMessage()

func (*PongReply) ProtoReflect

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

func (*PongReply) Reset

func (x *PongReply) Reset()

func (*PongReply) String

func (x *PongReply) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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