Documentation ¶
Overview ¶
Package fortune defines the Fortune example interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var FortuneDesc rpc.InterfaceDesc = descFortune
FortuneDesc describes the Fortune interface.
Functions ¶
This section is empty.
Types ¶
type FortuneClientMethods ¶
type FortuneClientMethods interface { // Returns a random fortune. Get(*context.T, ...rpc.CallOpt) (fortune string, _ error) // Adds a fortune to the set used by Get(). Add(_ *context.T, fortune string, _ ...rpc.CallOpt) error // Returns whether or not a fortune exists. Has(_ *context.T, fortune string, _ ...rpc.CallOpt) (bool, error) }
FortuneClientMethods is the client interface containing Fortune methods.
Fortune is the interface to a fortune-telling service.
type FortuneClientStub ¶
type FortuneClientStub interface { FortuneClientMethods rpc.UniversalServiceMethods }
FortuneClientStub adds universal methods to FortuneClientMethods.
func FortuneClient ¶
func FortuneClient(name string) FortuneClientStub
FortuneClient returns a client stub for Fortune.
type FortuneServerMethods ¶
type FortuneServerMethods interface { // Returns a random fortune. Get(*context.T, rpc.ServerCall) (fortune string, _ error) // Adds a fortune to the set used by Get(). Add(_ *context.T, _ rpc.ServerCall, fortune string) error // Returns whether or not a fortune exists. Has(_ *context.T, _ rpc.ServerCall, fortune string) (bool, error) }
FortuneServerMethods is the interface a server writer implements for Fortune.
Fortune is the interface to a fortune-telling service.
type FortuneServerStub ¶
type FortuneServerStub interface { FortuneServerStubMethods // Describe the Fortune interfaces. Describe__() []rpc.InterfaceDesc }
FortuneServerStub adds universal methods to FortuneServerStubMethods.
func FortuneServer ¶
func FortuneServer(impl FortuneServerMethods) FortuneServerStub
FortuneServer returns a server stub for Fortune. It converts an implementation of FortuneServerMethods into an object that may be used by rpc.Server.
type FortuneServerStubMethods ¶
type FortuneServerStubMethods FortuneServerMethods
FortuneServerStubMethods is the server interface containing Fortune methods, as expected by rpc.Server. There is no difference between this interface and FortuneServerMethods since there are no streaming methods.