registry

package
v0.16.25 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: BSD-3-Clause Imports: 4 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func C added in v0.12.30

func C(c uint64) string

func ConstructorName

func ConstructorName(c uint64) string

func ConstructorNumber added in v0.16.3

func ConstructorNumber(n string) uint64

func N added in v0.16.3

func N(n string) uint64

func Register added in v0.12.42

func Register(c uint64, n string, f Factory)

Types

type Envelope added in v0.12.42

type Envelope interface {
	GetConstructor() uint64
	GetMessage() []byte
}

type Factory added in v0.16.3

type Factory func() Message

type JSONEnvelope added in v0.16.3

type JSONEnvelope struct {
	RequestID   uint64            `json:"requestId,omitempty"`
	Header      map[string]string `json:"header,omitempty"`
	Constructor string            `json:"constructor"`
	Message     json.RawMessage   `json:"message,omitempty"`
}

type Message added in v0.16.3

type Message interface {
	proto.Message
	json.Marshaler
	json.Unmarshaler
}

Message defines the behavior of messages in Rony. They must be able to encode/decode ProtocolBuffer and JSON formats.

func Get added in v0.16.3

func Get(c uint64) (Message, error)

func Unwrap added in v0.12.42

func Unwrap(envelope Envelope) (Message, error)

func UnwrapJSON added in v0.16.5

func UnwrapJSON(envelope Envelope) (Message, error)

Jump to

Keyboard shortcuts

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