package manager

Import Path
	github.com/gotd/td/telegram/internal/manager (on go.dev)

Dependency Relation
	imports 17 packages, and imported by one package

Involved Source Files conn.go connmode_string.go create.go device.go Package manager contains connection management utilities. handler.go sync.go
Package-Level Type Names (total 10, in which 8 are exported)
/* sort exporteds by: | */
AtomicConfig is atomic tg.Config. Value atomic.Value CompareAndSwap executes the compare-and-swap operation for the Value. All calls to CompareAndSwap for a given Value must use values of the same concrete type. CompareAndSwap of an inconsistent type panics, as does CompareAndSwap(old, nil). Load loads atomically config and returns it. Store saves given config atomically. Swap stores new into Value and returns the previous value. It returns nil if the Value is empty. All calls to Swap for a given Value must use values of the same concrete type. Swap of an inconsistent type panics, as does Swap(nil). func NewAtomicConfig(cfg tg.Config) *AtomicConfig
Conn is a Telegram client connection. Invoke implements Invoker. OnMessage implements mtproto.Handler. OnSession implements mtproto.Handler. Ping calls ping for underlying protocol connection. Ready returns channel to determine connection readiness. Useful for pooling. Run initialize connection. *Conn : github.com/gotd/td/internal/mtproto.Handler *Conn : github.com/gotd/td/internal/pool.Conn *Conn : github.com/gotd/td/tg.Invoker func CreateConn(create mtproto.Dialer, mode ConnMode, appID int, opts mtproto.Options, connOpts ConnOptions) *Conn
ConnMode represents connection mode. ( ConnMode) String() string ConnMode : fmt.Stringer func CreateConn(create mtproto.Dialer, mode ConnMode, appID int, opts mtproto.Options, connOpts ConnOptions) *Conn const ConnModeCDN const ConnModeData const ConnModeUpdates
ConnOptions is a Telegram client connection options. Backoff func(ctx context.Context) backoff.BackOff DC int Device DeviceConfig Handler Handler Setup SetupCallback Test bool func CreateConn(create mtproto.Dialer, mode ConnMode, appID int, opts mtproto.Options, connOpts ConnOptions) *Conn
DeviceConfig is config which send when Telegram connection session created. Application version. Device model. Code for the language used on the client, ISO 639-1 standard. Language pack to use. Additional initConnection parameters. For now, only the tz_offset field is supported, for specifying timezone offset in seconds. Info about an MTProto proxy. Code for the language used on the device's OS, ISO 639-1 standard. Operating system version. SetDefaults sets default values.
Handler abstracts updates and session handler. ( Handler) OnMessage(b *bin.Buffer) error ( Handler) OnSession(cfg tg.Config, s mtproto.Session) error NoopHandler
NoopHandler is a noop handler. OnMessage implements Handler OnSession implements Handler. NoopHandler : Handler
SetupCallback is an optional setup connection callback.
Package-Level Functions (total 3, in which 2 are exported)
CreateConn creates new connection.
NewAtomicConfig creates new AtomicConfig.
Package-Level Variables (only one, which is unexported)
Package-Level Constants (total 4, in which 3 are exported)
ConnModeCDN is CDN connection mode.
ConnModeData is data connection mode.
ConnModeUpdates is update connection mode.