example

package
v0.0.0-...-b0358da Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package example is a generated protocol buffer package.

It is generated from these files:

service.proto

It has these top-level messages:

Req
Rep

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(tp transport.Transport, svc Service) natsrpc.Server

Types

type Client

type Client interface {
	Sum(context.Context, *Req, ...transport.RequestOption) (*Rep, error)
}

func NewClient

func NewClient(tp transport.Transport) Client

NewClient creates a new Service client.

type Rep

type Rep struct {
	Sum int32 `protobuf:"varint,1,opt,name=sum" json:"sum,omitempty"`
}

func (*Rep) Descriptor

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

func (*Rep) GetSum

func (m *Rep) GetSum() int32

func (*Rep) ProtoMessage

func (*Rep) ProtoMessage()

func (*Rep) Reset

func (m *Rep) Reset()

func (*Rep) String

func (m *Rep) String() string

type Req

type Req struct {
	Left  int32 `protobuf:"varint,1,opt,name=left" json:"left,omitempty"`
	Right int32 `protobuf:"varint,2,opt,name=right" json:"right,omitempty"`
}

func (*Req) Descriptor

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

func (*Req) GetLeft

func (m *Req) GetLeft() int32

func (*Req) GetRight

func (m *Req) GetRight() int32

func (*Req) ProtoMessage

func (*Req) ProtoMessage()

func (*Req) Reset

func (m *Req) Reset()

func (*Req) String

func (m *Req) String() string

type Service

type Service interface {
	Sum(context.Context, *Req) (*Rep, error)
}

func NewService

func NewService() Service

Directories

Path Synopsis
cmd
cli
Generated by nats-rpc.
Generated by nats-rpc.

Jump to

Keyboard shortcuts

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