server

package
v0.0.0-...-dcaeb47 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: ISC Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Entity

func Entity(id netrpc.EntityID) cchat.Identifier

Entity looks up the entity registry. Nil is returned if the ID is not found.

func FreeEntity

func FreeEntity(id netrpc.EntityID)

FreeEntity frees the entity from the global registry. If Type is a Service, then the function does nothing.

func PutEntity

func PutEntity(svc cchat.Service, ider cchat.Identifier)

PutEntity puts the given Identifier entity into the global map. It does nothing if ider is of type cchat.Service.

func Register

func Register(service cchat.Service)

Register registers a cchat.Service into the global RPC server. This function must be called before Serve is called; it is best called in init(). The service's ID must not contain any slashes, or the function will panic.

func Serve

func Serve()

Serve serves the RPC over stdio using JSONRPC2.

func ServeWithCodec

func ServeWithCodec(codec rpc.ServerCodec)

ServeWithCodec serves the giveen cchat service with the given RPC server codec over stdio.

func ServiceIDs

func ServiceIDs() []cchat.ID

ServiceIDs returns known service IDs.

Types

This section is empty.

Directories

Path Synopsis
Package types contains RPC server wrapper types.
Package types contains RPC server wrapper types.

Jump to

Keyboard shortcuts

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