Documentation ¶
Overview ¶
Package spec defines the interfaces between networked participants of the triagles display.
go get v.io/x/ref/cmd/vdl VDLPATH=$GOPATH/src $GOPATH/bin/vdl --builtin_vdlroot generate github.com/asimshankar/triangles/spec
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ScreenDesc rpc.InterfaceDesc = descScreen
ScreenDesc describes the Screen interface.
Functions ¶
This section is empty.
Types ¶
type ScreenClientMethods ¶
type ScreenClientMethods interface { // Invite is a request to the receiver to join the set of screens that // the caller is participating in, by standing to the right of the // caller. // // A Screen can be active on at most one invitation at a time and // should return an error if it is engaged in a previous invitation. Invite(*context.T, ...rpc.CallOpt) error // Give is a request by the caller for the receiver to take ownership // of the provided triangle. // // Give is typically invoked on the receiver by the adjacent screen // when a triangle falls off that adjacent screen. However, this is not // a requirement and Give can be invoked by an arbitrary client to // manufacture a new triangle. Give(_ *context.T, t Triangle, _ ...rpc.CallOpt) error }
ScreenClientMethods is the client interface containing Screen methods.
Screen represents a remote screen that can be invited to grab triangles.
type ScreenClientStub ¶
type ScreenClientStub interface { ScreenClientMethods rpc.UniversalServiceMethods }
ScreenClientStub adds universal methods to ScreenClientMethods.
func ScreenClient ¶
func ScreenClient(name string) ScreenClientStub
ScreenClient returns a client stub for Screen.
type ScreenServerMethods ¶
type ScreenServerMethods interface { // Invite is a request to the receiver to join the set of screens that // the caller is participating in, by standing to the right of the // caller. // // A Screen can be active on at most one invitation at a time and // should return an error if it is engaged in a previous invitation. Invite(*context.T, rpc.ServerCall) error // Give is a request by the caller for the receiver to take ownership // of the provided triangle. // // Give is typically invoked on the receiver by the adjacent screen // when a triangle falls off that adjacent screen. However, this is not // a requirement and Give can be invoked by an arbitrary client to // manufacture a new triangle. Give(_ *context.T, _ rpc.ServerCall, t Triangle) error }
ScreenServerMethods is the interface a server writer implements for Screen.
Screen represents a remote screen that can be invited to grab triangles.
type ScreenServerStub ¶
type ScreenServerStub interface { ScreenServerStubMethods // Describe the Screen interfaces. Describe__() []rpc.InterfaceDesc }
ScreenServerStub adds universal methods to ScreenServerStubMethods.
func ScreenServer ¶
func ScreenServer(impl ScreenServerMethods) ScreenServerStub
ScreenServer returns a server stub for Screen. It converts an implementation of ScreenServerMethods into an object that may be used by rpc.Server.
type ScreenServerStubMethods ¶
type ScreenServerStubMethods ScreenServerMethods
ScreenServerStubMethods is the server interface containing Screen methods, as expected by rpc.Server. There is no difference between this interface and ScreenServerMethods since there are no streaming methods.