Documentation
¶
Overview ¶
Package engine provides the core MTProto connection management.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface {
// Connect establishes the connection to Telegram.
Connect(ctx context.Context) error
// Disconnect gracefully closes the connection.
Disconnect() error
// API returns the high-level MTProto API client.
API() *tg.Client
// Raw returns the underlying telegram client.
Raw() *telegram.Client
// SetUpdateHandler sets the callback for incoming updates.
SetUpdateHandler(handler telegram.UpdateHandler)
}
Engine defines the core contract for MTProto network operations.
Click to show internal directories.
Click to hide internal directories.