app

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConnectionClosed = errors.New("Connection closed")
View Source
var ErrDuplicateMessage = errors.New("Message was already sent once")
View Source
var ErrEmptyUrl = errors.New("Url is empty")
View Source
var ErrHandshakeTimeout = errors.New("Handshake timeout")
View Source
var ErrHeartbeatTimeout = errors.New("Heartbeat timeout")
View Source
var ErrSubscriptionClosed = errors.New("Subscription is closed")
View Source
var ErrSubscriptionInboxFull = errors.New("Subscription incoming message buffer exceeded")
View Source
var ErrSubscriptionNotFound = errors.New("Subscription not found")

Functions

This section is empty.

Types

type AuthorizeCommandInput

type AuthorizeCommandInput struct {
	Channel string
	Payload []byte
}

type Clock

type Clock interface {
	NewTimer(time.Duration) Timer
	Now() time.Time
}

type Codec

type Codec interface {
	Encoder
	Decoder
}

type Decoder

type Decoder interface {
	Decode(Payload) (Message, error)
}

type Encoder

type Encoder interface {
	Encode(Frame) (Payload, error)
}

type Frame

type Frame interface {
	ID() string
	Encode() (Payload, error)
}

type FrameBuilder

type FrameBuilder interface {
	WithPayload(Payload) FrameBuilder
	WithChannel(string) FrameBuilder
	WithSignature(Signature) FrameBuilder
	WithType(string) FrameBuilder
	WithID(string) FrameBuilder
	Build() Frame
}

type FrameBuilderFactory

type FrameBuilderFactory interface {
	Create() FrameBuilder
}

type Heartbeat

type Heartbeat interface {
	Start(context.Context, time.Duration) error
	Reset()
}

type Inbox

type Inbox interface {
	Next(context.Context) (Message, error)
}

type Logger

type Logger interface {
	Debug(string, ...any)
	SetContext(string) Logger
}

type Message

type Message any

INFO: Temporary placeholder type. Final structure TBD

type Payload

type Payload []byte

type RequestAuthorizer

type RequestAuthorizer interface {
	Authorize(context.Context, AuthorizeCommandInput) (Signature, error)
}

type Router

type Router interface {
	Handle(context.Context, Message) error
}

type SendMessageService

type SendMessageService interface {
	Send(context.Context, Frame) error
}

type Signature

type Signature map[string]string

type Timer

type Timer interface {
	C() <-chan time.Time
	Stop() bool
	Reset(time.Duration)
}

Jump to

Keyboard shortcuts

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