definition

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateBase

func ValidateBase(base Base) error

func ValidateName

func ValidateName(name string) error

Types

type Base

type Base struct {
	Kind    Kind
	Name    string
	Version int
}

func (Base) Key

func (b Base) Key() string

type Codec

type Codec struct {
	Type reflect.Type
	Name string
}

func NewCodec

func NewCodec[T any]() Codec

func (Codec) Compatible

func (c Codec) Compatible(other Codec) bool

func (Codec) Decode

func (c Codec) Decode(data []byte) (any, error)

func (Codec) Encode

func (c Codec) Encode(value any, maxBytes int) (canonical.Value, error)

type Command

type Command struct {
	Base
	Args   Codec
	Result Codec
}

type Event

type Event struct {
	Name      string
	Namespace string
	Payload   Codec
}

type Kind

type Kind string
const (
	CommandKind Kind = "command"
	EventKind   Kind = "event"
)

Jump to

Keyboard shortcuts

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