example

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GreetingToAll_NRServiceName = "natsrpc.example.GreetingToAll"
)
View Source
const (
	Greeting_NRServiceName = "natsrpc.example.Greeting"
)

Variables

View Source
var File_example_proto protoreflect.FileDescriptor
View Source
var GreetingToAll_NRServiceDesc = natsrpc.ServiceDesc{
	ServiceName: GreetingToAll_NRServiceName,
	Methods: []natsrpc.MethodDesc{
		{
			MethodName:  "HelloToAll",
			Handler:     _GreetingToAll_HelloToAll_NRHandler,
			RequestType: reflect.TypeOf(HelloRequest{}),
			IsPublish:   true,
		},
	},
	Metadata: "example.proto",
}
View Source
var Greeting_NRServiceDesc = natsrpc.ServiceDesc{
	ServiceName: Greeting_NRServiceName,
	Methods: []natsrpc.MethodDesc{
		{
			MethodName:  "Hello",
			Handler:     _Greeting_Hello_NRHandler,
			RequestType: reflect.TypeOf(HelloRequest{}),
			IsPublish:   false,
		},
	},
	Metadata: "example.proto",
}

Functions

func IfNotNilPanic

func IfNotNilPanic(err error)

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 GreetingNRClient

type GreetingNRClient interface {
	Hello(ctx context.Context, req *HelloRequest, opt ...natsrpc.CallOption) (*HelloReply, error)
}

func NewGreetingNRClient

func NewGreetingNRClient(c natsrpc.ClientInterface) GreetingNRClient

NewGreetingNRClient

type GreetingNRServer

type GreetingNRServer interface {
	Hello(ctx context.Context, req *HelloRequest) (*HelloReply, error)
}

type GreetingToAllNRClient

type GreetingToAllNRClient interface {
	HelloToAll(ctx context.Context, notify *HelloRequest, opt ...natsrpc.CallOption) error
}

func NewGreetingToAllNRClient

func NewGreetingToAllNRClient(c natsrpc.ClientInterface) GreetingToAllNRClient

NewGreetingToAllNRClient

type GreetingToAllNRServer

type GreetingToAllNRServer interface {
	HelloToAll(ctx context.Context, req *HelloRequest) (*Empty, error)
}

type HelloReply

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

func (*HelloReply) Descriptor deprecated

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

Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.

func (*HelloReply) GetMessage

func (x *HelloReply) GetMessage() string

func (*HelloReply) ProtoMessage

func (*HelloReply) ProtoMessage()

func (*HelloReply) ProtoReflect

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

func (*HelloReply) Reset

func (x *HelloReply) Reset()

func (*HelloReply) String

func (x *HelloReply) String() string

type HelloRequest

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

func (*HelloRequest) Descriptor deprecated

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

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) GetName

func (x *HelloRequest) GetName() string

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) ProtoReflect

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

func (*HelloRequest) Reset

func (x *HelloRequest) Reset()

func (*HelloRequest) String

func (x *HelloRequest) String() string

Jump to

Keyboard shortcuts

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