example

package
v0.0.0-...-0bde82d Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TYPE_MAKE_GREETER = 0x9685d09cb0114f1f
	TYPE_HELLO        = 0xa79e175dc97ed3ab
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Greeter

type Greeter struct {
	Name string
	Self uint64
}

func (*Greeter) Clunk

func (g *Greeter) Clunk(cs *coolmsg.ConnServer)

func (*Greeter) Message

func (g *Greeter) Message(ctx context.Context, cs *coolmsg.ConnServer, m coolmsg.Message, respond coolmsg.RespondFunc)

func (*Greeter) UnknownMessage

func (g *Greeter) UnknownMessage(ctx context.Context, cs *coolmsg.ConnServer, t uint64, buf []byte, respond coolmsg.RespondFunc)

type Hello

type Hello struct {
	From string
}

func (*Hello) CoolMsg_Marshal

func (m *Hello) CoolMsg_Marshal() []byte

func (*Hello) CoolMsg_TypeId

func (m *Hello) CoolMsg_TypeId() uint64

func (*Hello) CoolMsg_Unmarshal

func (m *Hello) CoolMsg_Unmarshal(buf []byte) bool

type MakeGreeter

type MakeGreeter struct {
	Name string
}

func (*MakeGreeter) CoolMsg_Marshal

func (m *MakeGreeter) CoolMsg_Marshal() []byte

func (*MakeGreeter) CoolMsg_TypeId

func (m *MakeGreeter) CoolMsg_TypeId() uint64

func (*MakeGreeter) CoolMsg_Unmarshal

func (m *MakeGreeter) CoolMsg_Unmarshal(buf []byte) bool

type RootObject

type RootObject struct {
	Name string
}

The RootObject will be our bootstrap object, it responds to MakeGreeter messages with MakeGreeterReply messages.

func (*RootObject) Clunk

func (r *RootObject) Clunk(cs *coolmsg.ConnServer)

Clunk is the cleanup method of an object, the name Clunk comes from the 9p protocol. An object is clunked when a server is done with it.

func (*RootObject) Message

func (r *RootObject) Message(ctx context.Context, cs *coolmsg.ConnServer, m coolmsg.Message, respond coolmsg.RespondFunc)

func (*RootObject) UnknownMessage

func (r *RootObject) UnknownMessage(ctx context.Context, cs *coolmsg.ConnServer, t uint64, buf []byte, respond coolmsg.RespondFunc)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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