fortune

package
v0.0.0-...-3dadef2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2016 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package fortune defines the Fortune example interface.

Index

Constants

This section is empty.

Variables

View Source
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.

Directories

Path Synopsis
Command fortune is a client to the Fortune interface.
Command fortune is a client to the Fortune interface.
Command fortuned runs a daemon that implements the Fortune interface.
Command fortuned runs a daemon that implements the Fortune interface.

Jump to

Keyboard shortcuts

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