echoservice

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 ListenAndServeEchoService

func ListenAndServeEchoService(addr string, backend EchoService) error

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

func RegisterEchoServiceWeb added in v1.1.0

func RegisterEchoServiceWeb(this EchoServiceWeb, mux webrpc.ServeMux) error

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

func ServeEchoService

func ServeEchoService(conn net.Conn, backend EchoService) error

ServeEchoService serves the given EchoService backend implementation on conn.

Types

type EchoService

type EchoService interface {
	Echo(in *Payload, out *Payload) error
}

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

func DialEchoService

func DialEchoService(addr string) (EchoService, error)

DialEchoService returns a EchoService for calling the EchoService servince at addr (TCP).

func NewEchoServiceClient

func NewEchoServiceClient(conn net.Conn) EchoService

NewEchoServiceClient returns an *rpc.Client wrapper for calling the methods of EchoService remotely.

func NewEchoServiceWebClient added in v1.1.0

func NewEchoServiceWebClient(pro webrpc.Protocol, remote *url.URL) EchoService

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

type EchoServiceWeb added in v1.1.0

type EchoServiceWeb interface {
	Echo(r *http.Request, in *Payload, out *Payload) error
}

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

type Payload

type Payload struct {
	Message          *string `protobuf:"bytes,1,req,name=message" json:"message,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Payload) GetMessage

func (this *Payload) GetMessage() string

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) Reset

func (this *Payload) Reset()

func (*Payload) String

func (this *Payload) String() string

Jump to

Keyboard shortcuts

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