addservice

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2013 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServeAddService

func ListenAndServeAddService(addr string, backend AddService) error

ListenAndServeAddService serves the given AddService backend implementation on all connections accepted as a result of listening on addr (TCP).

func RegisterAddServiceWeb

func RegisterAddServiceWeb(this AddServiceWeb, mux webrpc.ServeMux) error

Register a AddServiceWeb implementation with the given webrpc ServeMux. If mux is nil, the default webrpc.ServeMux is used.

func ServeAddService

func ServeAddService(conn net.Conn, backend AddService) error

ServeAddService serves the given AddService backend implementation on conn.

Types

type AddMessage

type AddMessage struct {
	X                *int32 `protobuf:"varint,1,req,name=x" json:"x,omitempty"`
	Y                *int32 `protobuf:"varint,2,req,name=y" json:"y,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*AddMessage) GetX

func (this *AddMessage) GetX() int32

func (*AddMessage) GetY

func (this *AddMessage) GetY() int32

func (*AddMessage) ProtoMessage

func (*AddMessage) ProtoMessage()

func (*AddMessage) Reset

func (this *AddMessage) Reset()

func (*AddMessage) String

func (this *AddMessage) String() string

type AddService

type AddService interface {
	Add(in *AddMessage, out *SumMessage) error
}

AddService is an interface satisfied by the generated client and which must be implemented by the object wrapped by the server.

func DialAddService

func DialAddService(addr string) (AddService, error)

DialAddService returns a AddService for calling the AddService servince at addr (TCP).

func NewAddServiceClient

func NewAddServiceClient(conn net.Conn) AddService

NewAddServiceClient returns an *rpc.Client wrapper for calling the methods of AddService remotely.

func NewAddServiceWebClient

func NewAddServiceWebClient(pro webrpc.Protocol, remote *url.URL) AddService

NewAddServiceWebClient returns a webrpc wrapper for calling the methods of AddService remotely via the web. The remote URL is the base URL of the webrpc server.

type AddServiceWeb

type AddServiceWeb interface {
	Add(r *http.Request, in *AddMessage, out *SumMessage) error
}

AddServiceWeb is the web-based RPC version of the interface which must be implemented by the object wrapped by the webrpc server.

type SumMessage

type SumMessage struct {
	Z                *int32 `protobuf:"varint,1,req,name=z" json:"z,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*SumMessage) GetZ

func (this *SumMessage) GetZ() int32

func (*SumMessage) ProtoMessage

func (*SumMessage) ProtoMessage()

func (*SumMessage) Reset

func (this *SumMessage) Reset()

func (*SumMessage) String

func (this *SumMessage) String() string

Jump to

Keyboard shortcuts

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