Selaa lähdekoodia

Add mtglib-level documentation

tags/v2.0.0-rc1
9seconds 5 vuotta sitten
vanhempi
commit
d3aa0f2de5
1 muutettua tiedostoa jossa 17 lisäystä ja 0 poistoa
  1. 17
    0
      mtglib/init.go

+ 17
- 0
mtglib/init.go Näytä tiedosto

1
+// mtglib defines a package with MTPROTO proxy.
2
+//
3
+// Since mtg itself is build as an example of how to work with mtglib,
4
+// it worth to telling a couple of words about a project organization.
5
+//
6
+// A core object of the project is mtglib.Proxy. This is a proxy you
7
+// expect: that one which you configure, set to serve on a listener
8
+// and/or shutdown on application termination.
9
+//
10
+// But it also has a core logic unrelated to Telegram per se: anti
11
+// replay cache, network connectivity (who knows, maybe you want to have
12
+// a native VMESS integration) and so on.
13
+//
14
+// You can supply such parts to a proxy with interfaces. The rest of
15
+// the packages in mtg define some default implementations of these
16
+// interfaces. But if you want to integrate it with, let say, influxdb,
17
+// you can do it easily.
1
 package mtglib
18
 package mtglib
2
 
19
 
3
 import (
20
 import (

Loading…
Peruuta
Tallenna