[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [pluggable-transports/snowflake] 02/02: Move ptEventLogger into the client/snowflake.go
This is an automated email from the git hooks/post-receive script.
meskio pushed a commit to branch main
in repository pluggable-transports/snowflake.
commit 3473b438e518f12fc1e0945b362e8cef25756b4f
Author: meskio <meskio@xxxxxxxxxxxxxx>
AuthorDate: Wed May 25 17:56:12 2022 +0200
Move ptEventLogger into the client/snowflake.go
Remove client/pt_event_logger.go file as is very minimal.
---
client/pt_event_logger.go | 17 -----------------
client/snowflake.go | 12 ++++++++++++
2 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/client/pt_event_logger.go b/client/pt_event_logger.go
deleted file mode 100644
index 483a3c6..0000000
--- a/client/pt_event_logger.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package main
-
-import (
- pt "git.torproject.org/pluggable-transports/goptlib.git"
- "git.torproject.org/pluggable-transports/snowflake.git/v2/common/event"
-)
-
-func NewPTEventLogger() event.SnowflakeEventReceiver {
- return &ptEventLogger{}
-}
-
-type ptEventLogger struct {
-}
-
-func (p ptEventLogger) OnNewSnowflakeEvent(e event.SnowflakeEvent) {
- pt.Log(pt.LogSeverityNotice, e.String())
-}
diff --git a/client/snowflake.go b/client/snowflake.go
index ac66a0d..2cb6549 100644
--- a/client/snowflake.go
+++ b/client/snowflake.go
@@ -17,6 +17,7 @@ import (
pt "git.torproject.org/pluggable-transports/goptlib.git"
sf "git.torproject.org/pluggable-transports/snowflake.git/v2/client/lib"
+ "git.torproject.org/pluggable-transports/snowflake.git/v2/common/event"
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/safelog"
)
@@ -24,6 +25,17 @@ const (
DefaultSnowflakeCapacity = 1
)
+type ptEventLogger struct {
+}
+
+func NewPTEventLogger() event.SnowflakeEventReceiver {
+ return &ptEventLogger{}
+}
+
+func (p ptEventLogger) OnNewSnowflakeEvent(e event.SnowflakeEvent) {
+ pt.Log(pt.LogSeverityNotice, e.String())
+}
+
// Exchanges bytes between two ReadWriters.
// (In this case, between a SOCKS connection and a snowflake transport conn)
func copyLoop(socks, sfconn io.ReadWriter) {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits