Documentation
¶
Index ¶
- Constants
- Variables
- func HandleEchoCall(s EchoHandler, p *grpcproc.Process[proto.Message], ...) (proto.Message, error)
- func HandleEchoMessage(s EchoHandler, p *grpcproc.Process[proto.Message], ...) error
- func HandleRoomCall(s RoomHandler, p *grpcproc.Process[proto.Message], ...) (proto.Message, error)
- func HandleRoomMessage(s RoomHandler, p *grpcproc.Process[proto.Message], ...) error
- type EchoAddr
- type EchoHandler
- type Note
- type Nothing
- type Ping
- type Pong
- type RoomAddr
- type RoomHandler
Constants ¶
const EchoProcess = "echo"
EchoProcess is the name a process of the Echo service is registered under on its node.
Variables ¶
var File_protocgen_testpb_gen_proto protoreflect.FileDescriptor
var File_protocgen_testpb_nosvc_proto protoreflect.FileDescriptor
Functions ¶
func HandleEchoCall ¶
func HandleEchoCall(s EchoHandler, p *grpcproc.Process[proto.Message], m grpcproc.Msg[proto.Message]) (proto.Message, error)
HandleEchoCall answers a call to a process of the Echo service through s, for an actor.CallHandler's HandleCall; a call of another type is answered grpcproc.ErrType.
func HandleEchoMessage ¶
func HandleEchoMessage(s EchoHandler, p *grpcproc.Process[proto.Message], m grpcproc.Msg[proto.Message]) error
HandleEchoMessage takes a send to a process of the Echo service through s, for an actor.Handler's HandleMessage; a message of another type is logged and dropped, as actor.CallsOnly drops one.
func HandleRoomCall ¶
func HandleRoomCall(s RoomHandler, p *grpcproc.Process[proto.Message], m grpcproc.Msg[proto.Message]) (proto.Message, error)
HandleRoomCall answers a call to a process of the Room service through s, for an actor.CallHandler's HandleCall; a call of another type is answered grpcproc.ErrType.
func HandleRoomMessage ¶
func HandleRoomMessage(s RoomHandler, p *grpcproc.Process[proto.Message], m grpcproc.Msg[proto.Message]) error
HandleRoomMessage takes a send to a process of the Room service through s, for an actor.Handler's HandleMessage; a message of another type is logged and dropped, as actor.CallsOnly drops one.
Types ¶
type EchoAddr ¶
EchoAddr addresses a process of the Echo service; its methods are its rpcs.
Echo answers pings, and takes notes.
func EchoAddrOf ¶
EchoAddrOf addresses t, a PID, a Name or a global name, as a process of the Echo service.
type EchoHandler ¶
type EchoHandler interface {
Ping(p *grpcproc.Process[proto.Message], m grpcproc.Msg[proto.Message], req *Ping) (*Pong, error)
Note(p *grpcproc.Process[proto.Message], m grpcproc.Msg[proto.Message], req *Note) error
}
EchoHandler is what a process of the Echo service does with what it is sent: a method per call, whose result is the reply, as actor.CallHandler's is, and one per send. HandleEchoCall and HandleEchoMessage dispatch to it.
type Note ¶
type Note struct {
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
// contains filtered or unexported fields
}
func (*Note) Descriptor
deprecated
func (*Note) ProtoMessage ¶
func (*Note) ProtoMessage()
func (*Note) ProtoReflect ¶
func (x *Note) ProtoReflect() protoreflect.Message
type Nothing ¶
type Nothing struct {
// contains filtered or unexported fields
}
func (*Nothing) Descriptor
deprecated
func (*Nothing) ProtoMessage ¶
func (*Nothing) ProtoMessage()
func (*Nothing) ProtoReflect ¶
func (x *Nothing) ProtoReflect() protoreflect.Message
type Ping ¶
type Ping struct {
N int64 `protobuf:"varint,1,opt,name=n,proto3" json:"n,omitempty"`
// contains filtered or unexported fields
}
func (*Ping) Descriptor
deprecated
func (*Ping) ProtoMessage ¶
func (*Ping) ProtoMessage()
func (*Ping) ProtoReflect ¶
func (x *Ping) ProtoReflect() protoreflect.Message
type Pong ¶
type Pong struct {
N int64 `protobuf:"varint,1,opt,name=n,proto3" json:"n,omitempty"`
// contains filtered or unexported fields
}
func (*Pong) Descriptor
deprecated
func (*Pong) ProtoMessage ¶
func (*Pong) ProtoMessage()
func (*Pong) ProtoReflect ¶
func (x *Pong) ProtoReflect() protoreflect.Message
type RoomAddr ¶
RoomAddr addresses a process of the Room service; its methods are its rpcs.
func RoomAddrOf ¶
RoomAddrOf addresses t, a PID, a Name or a global name, as a process of the Room service.
type RoomHandler ¶
type RoomHandler interface {
Bounce(p *grpcproc.Process[proto.Message], m grpcproc.Msg[proto.Message], req *Ping) (*Pong, error)
}
RoomHandler is what a process of the Room service does with what it is sent: a method per call, whose result is the reply, as actor.CallHandler's is, and one per send. HandleRoomCall and HandleRoomMessage dispatch to it.