helloworld

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package helloworld generated by protoc-gen-nrpc. sources: helloworld.proto

Index

Constants

This section is empty.

Variables

View Source
var File_helloworld_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Client

type Client struct {
	Greeter *GreeterClient
	// contains filtered or unexported fields
}

func NewClient

func NewClient(nc nrpc.NatsConn) *Client

func (*Client) SetEncoding

func (c *Client) SetEncoding(encoding string)

func (*Client) SetTimeout

func (c *Client) SetTimeout(t time.Duration)

type GreeterClient

type GreeterClient struct {
	Subject  string
	Encoding string
	Timeout  time.Duration
	// contains filtered or unexported fields
}

func NewGreeterClient

func NewGreeterClient(nc nrpc.NatsConn) *GreeterClient

func (*GreeterClient) SayHello

func (c *GreeterClient) SayHello(req *HelloRequest) (*HelloReply, error)

func (*GreeterClient) SetEncoding

func (c *GreeterClient) SetEncoding(encoding string)

func (*GreeterClient) SetTimeout

func (c *GreeterClient) SetTimeout(t time.Duration)

type GreeterHandler

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

GreeterHandler provides a NATS subscription handler that can serve a subscription using a given GreeterService implementation.

func NewGreeterConcurrentHandler

func NewGreeterConcurrentHandler(workers *nrpc.WorkerPool, nc nrpc.NatsConn, s GreeterService) *GreeterHandler

func NewGreeterHandler

func NewGreeterHandler(ctx context.Context, nc nrpc.NatsConn, s GreeterService) *GreeterHandler

func (*GreeterHandler) MsgHandler added in v0.0.3

func (h *GreeterHandler) MsgHandler(msg *nats.Msg)

func (*GreeterHandler) SetEncodings

func (h *GreeterHandler) SetEncodings(encodings []string)

SetEncodings sets the output encodings when using a '*Publish' function

func (*GreeterHandler) Subject

func (h *GreeterHandler) Subject() string

type GreeterService

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

GreeterService is the interface that providers of the service Greeter should implement.

type HelloReply

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

The response message containing the greetings

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
}

The request message containing the user's name.

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