github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/tm2/pkg/p2p/conn/package.go (about) 1 package conn 2 3 import ( 4 "reflect" 5 6 "github.com/gnolang/gno/tm2/pkg/amino" 7 "github.com/gnolang/gno/tm2/pkg/amino/pkg" 8 ) 9 10 var Package = amino.RegisterPackage(amino.NewPackage( 11 "github.com/gnolang/gno/tm2/pkg/p2p/conn", 12 "p2p", // keep short, do not change. 13 amino.GetCallersDirname(), 14 ). 15 WithDependencies( 16 // NA 17 ). 18 WithTypes( 19 20 // NOTE: Keep the names short. 21 pkg.Type{ 22 Type: reflect.TypeOf(PacketPing{}), 23 Name: "Ping", 24 }, 25 pkg.Type{ 26 Type: reflect.TypeOf(PacketPong{}), 27 Name: "Pong", 28 }, 29 pkg.Type{ 30 Type: reflect.TypeOf(PacketMsg{}), 31 Name: "Msg", 32 }, 33 ))