bridge

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultReconnectBaseDelay = 500 * time.Millisecond
	DefaultReconnectMaxDelay  = 15 * time.Second
)

Variables

This section is empty.

Functions

func ActorAddress

func ActorAddress(networkID string, actor protocol.Actor) string

func ChatID

func ChatID(networkID string, target protocol.Target, fallbackMessageID ...string) string

func DisplayName

func DisplayName(agent bridgeconfig.AgentConfig) string

func ParseMentions

func ParseMentions(text string) []string

func RenderCompactBootstrapMessage

func RenderCompactBootstrapMessage(networkID string, target protocol.Target, includeSessionHeader bool) string

func RenderCompactInboundMessage

func RenderCompactInboundMessage(
	networkID string,
	message *protocol.Message,
	includeSessionHeader bool,
) string

func RenderDataPart

func RenderDataPart(data map[string]any) (string, bool)

func RenderInboundText

func RenderInboundText(message *protocol.Message) string

func RenderMessageBody

func RenderMessageBody(message *protocol.Message) string

func SenderName

func SenderName(actor protocol.Actor) string

func ShouldRead

func ShouldRead(mode bridgeconfig.ReadConfig, target protocol.Target, mentions []string, agent bridgeconfig.AgentConfig) bool

func ShouldReadDirect

func ShouldReadDirect(mode bridgeconfig.ReadConfig) bool

func ShouldReadForNetwork

func ShouldReadForNetwork(
	mode bridgeconfig.ReadConfig,
	target protocol.Target,
	mentions []string,
	networkID string,
	agent bridgeconfig.AgentConfig,
) bool

func ShouldReply

func ShouldReply(mode bridgeconfig.ReplyConfig) bool

func TargetPrefix

func TargetPrefix(target protocol.Target, sender string) string

Types

type Backoff

type Backoff struct {
	// contains filtered or unexported fields
}

func NewBackoff

func NewBackoff(base time.Duration, max time.Duration) *Backoff

func (*Backoff) Delay

func (b *Backoff) Delay(attempt int) time.Duration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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