v.io: v.io/x/ref/examples/fortune Index | Files | Directories

package fortune

import "v.io/x/ref/examples/fortune"

Package fortune defines the Fortune example interface. nolint:golint

Index

Package Files

fortune.vdl.go

Variables

var FortuneDesc rpc.InterfaceDesc = descFortune

FortuneDesc describes the Fortune interface.

type FortuneClientMethods Uses

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 Uses

type FortuneClientStub interface {
    FortuneClientMethods
}

FortuneClientStub embeds FortuneClientMethods and is a placeholder for additional management operations.

func FortuneClient Uses

func FortuneClient(name string) FortuneClientStub

FortuneClient returns a client stub for Fortune.

type FortuneServerMethods Uses

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 Uses

type FortuneServerStub interface {
    FortuneServerStubMethods
    // DescribeInterfaces the Fortune interfaces.
    Describe__() []rpc.InterfaceDesc
}

FortuneServerStub adds universal methods to FortuneServerStubMethods.

func FortuneServer Uses

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 Uses

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

PathSynopsis
fortuneCommand fortune is a client to the Fortune interface.
fortunedCommand fortuned runs a daemon that implements the Fortune interface.
fortuned/internal

Package fortune imports 3 packages (graph) and is imported by 8 packages. Updated 2020-10-24. Refresh now. Tools for package owners.