Documentation
¶
Index ¶
- Constants
- Variables
- func DeserializeDispatch(data []byte) (observers []ruid.ID, param []byte, err error)
- func DeserializeGhosts(data []byte) (ghosts []ruid.ID, err error)
- func DeserializeRequest(data []byte) (i ruid.ID, ss []string, m string, p []byte, err error)
- func DeserializeSessionGate(data []byte) (session ruid.ID, gate string, err error)
- func Gate(address string, session string, version [16]byte, symbols []string, ...)
- func Go(dir string, types []tygo.Type)
- func IDENT_FromString(name string) int
- func Inject(dir string, filename string, pkgname string, types []tygo.Type, _ []tygo.Type, ...)
- func Python(identName string, input string, pyOut string, goOut string, ignore []string)
- func ReplaceEntity(dir string, filename string, pkgname string, types []tygo.Type, _ []tygo.Type, ...)
- func ReserializeComponents(components [][]byte) (size int, cs []uint64, ds [][]byte, err error)
- func ReserializeNotify(method string, data []byte) (param []byte, err error)
- func SerializeDispatch(observers map[ruid.ID]bool, param []byte) (data []byte)
- func SerializeGhosts(ghosts []ruid.ID) (data []byte)
- func SerializeRequest(i ruid.ID, ss []string, m string, p []byte) (data []byte)
- func SerializeSynchron(i ruid.ID, components [][]byte, handshake []byte) (data []byte, err error)
- func Typescript(identName string, tsOut string, goOut string, inputs []string)
- type Behavior
- type Component
- type Connection
- type Depend
- type Entity
- type GateImpl
- type HubImpl
- type Network
- type Node
- type Register
- type Server
- type Service
Constants ¶
View Source
const ( IDENT_RUID = iota IDENT_UUID IDENT_STRID )
View Source
const ( SYMBOL_GATE = "GATE" SYMBOL_HUB = "HUB" SYMBOL_CREATE = "CREATE" SYMBOL_DESTROY = "DESTROY" SYMBOL_SYNCHRON = "SYNCHRON" SYMBOL_NOTIFY = "NOTIFY" SYMBOL_OBSERVE = "OBSERVE" SYMBOL_IGNORE = "IGNORE" )
View Source
const CLIENT_ENTITY_FMT = "%sClient"
View Source
const (
ENTITY_CODE = `` /* 1781-byte string literal not displayed */
)
View Source
const PY_HEADER = `#-*- coding: utf-8 -*-
# Generated by ibelie-rpc. DO NOT EDIT!
`
Variables ¶
View Source
var ( SYMBOL_SESSION string CREATE_SESSION []byte HANDSHAKE_DATA []byte GATE_SYMBOLS []string GATE_SYMDICT = make(map[string]uint64) )
View Source
var ( FMT_PKG = map[string]string{"fmt": ""} STR_PKG = map[string]string{"strings": ""} LOCAL_PKG = map[string]string{ "fmt": "", "sync": "", "github.com/ibelie/rpc": "", "github.com/ibelie/ruid": "", "github.com/ibelie/tygo": "", } PROP_PRE = []tygo.Type{tygo.SimpleType_SYMBOL, tygo.SimpleType_SYMBOL} DELEGATE = "Delegate" )
View Source
var ( SRC_PATH = path.Join(os.Getenv("GOPATH"), "src") PKG_PATH = reflect.TypeOf(Depend{}).PkgPath() )
View Source
var BUILTIN_SYMBOLS = []string{ SYMBOL_GATE, SYMBOL_HUB, SYMBOL_CREATE, SYMBOL_DESTROY, SYMBOL_SYNCHRON, SYMBOL_NOTIFY, SYMBOL_OBSERVE, SYMBOL_IGNORE, }
View Source
var ClientEntityCache = make(map[string]string)
View Source
var ENTITY_PKG = map[string]string{
"github.com/ibelie/rpc": "",
"github.com/ibelie/ruid": "",
"github.com/ibelie/tygo": "",
}
View Source
var GateInst = GateImpl{/* contains filtered or unexported fields */}
View Source
var HubInst = HubImpl{/* contains filtered or unexported fields */}
View Source
var IDENT_PKG = [][2]string{ [2]string{"github.com/ibelie/ruid", "ruid.RUIdent"}, [2]string{"github.com/ibelie/rpc/uuid", "uuid.UUIdent"}, [2]string{"github.com/ibelie/rpc/strid", "strid.STRIdent"}, }
View Source
var JSID_BYTESIZE = []func(string) string{ func(value string) string { return fmt.Sprintf("8") }, func(value string) string { return fmt.Sprintf("16") }, func(value string) string { return fmt.Sprintf("ibelie.tyts.String.ByteSize(%s, 0, false)", value) }, }
View Source
var JSID_READ = []func(string) string{ func(protobuf string) string { return fmt.Sprintf("%s.ReadBase64(8)", protobuf) }, func(protobuf string) string { return fmt.Sprintf("%s.ReadBase64(16)", protobuf) }, func(protobuf string) string { return fmt.Sprintf("ibelie.tyts.String.Deserialize(null, %s)", protobuf) }, }
View Source
var JSID_REQUIRE = []string{
"",
"",
`
goog.require('ibelie.tyts.String');
`,
}
View Source
var JSID_WRITE = []func(string, string) string{ func(protobuf string, value string) string { return fmt.Sprintf("%s.WriteBase64(%s)", protobuf, value) }, func(protobuf string, value string) string { return fmt.Sprintf("%s.WriteBase64(%s)", protobuf, value) }, func(protobuf string, value string) string { return fmt.Sprintf("ibelie.tyts.String.Serialize(%s, 0, false, %s)", value, protobuf) }, }
Functions ¶
func DeserializeDispatch ¶
func DeserializeRequest ¶
func DeserializeSessionGate ¶
func IDENT_FromString ¶
func ReplaceEntity ¶
func ReserializeComponents ¶
func ReserializeNotify ¶
func SerializeDispatch ¶
func SerializeGhosts ¶
func SerializeRequest ¶
func SerializeSynchron ¶
Types ¶
type Connection ¶
type Network ¶
type Network interface { Connect(string) Connection Serve(string, func(Connection)) }
type Server ¶
type Server interface { Serve() GetNode() *Node Add(string, *Node) Remove(string) Address() string Register(...*Node) ZeroID() ruid.ID ServerID() ruid.ID DeserializeID(*tygo.ProtoBuf) (ruid.ID, error) Notify(ruid.ID, ruid.ID, string, []byte) error Message(ruid.ID, ruid.ID, ruid.ID, string, []byte) ([]byte, error) Distribute(ruid.ID, ruid.ID, string, string, []byte) ([][]byte, error) Procedure(ruid.ID, ruid.ID, string, string, string, []byte) ([]byte, error) Request(string, ruid.ID, string, []byte, ...string) ([][]byte, error) }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.