internal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientMessage

type ClientMessage struct {
	Type    types.ClientMessage `json:"type"`
	Content []byte              `json:"content"`
}

func (ClientMessage) MarshalJSON

func (m ClientMessage) MarshalJSON() ([]byte, error)

func (ClientMessage) Match

func (m ClientMessage) Match(other ClientMessage) bool

type ConsumableEcho

type ConsumableEcho struct {
	Echo Echo
	// contains filtered or unexported fields
}

type Echo

type Echo struct {
	ConnectionID uint64      `json:"connectionID"`
	Sequences    []*Sequence `json:"sequences"`
}

func NewEcho

func NewEcho(sessionID uint64) *Echo

func (*Echo) AddClientMessage

func (e *Echo) AddClientMessage(message ClientMessage)

func (*Echo) AddServerMessage

func (e *Echo) AddServerMessage(message ServerMessage)

type Sequence

type Sequence struct {
	ClientMessages []ClientMessage `json:"clientMessages"`
	ServerMessages []ServerMessage `json:"serverMessages"`
}

type ServerMessage

type ServerMessage struct {
	Type    types.ServerMessage `json:"type"`
	Content []byte              `json:"content"`
}

func (ServerMessage) MarshalJSON

func (m ServerMessage) MarshalJSON() ([]byte, error)

type Timeline

type Timeline struct {
	Echoes []*ConsumableEcho
	// contains filtered or unexported fields
}

func (*Timeline) Match

func (t *Timeline) Match(
	ctx context.Context,
	lastUsedConnectionID uint64,
	messagesChan <-chan ClientMessage,
	strictOrdering bool,
) (Echo, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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