[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [snowflake/main] Change package name and add a package comment



commit 6c6a2e44abdd71e1f369d32bc3f1b9f7ed00102c
Author: Cecylia Bocovich <cohosh@xxxxxxxxxxxxxx>
Date:   Thu Sep 9 16:25:07 2021 -0400

    Change package name and add a package comment
---
 client/lib/interfaces.go          |  2 +-
 client/lib/lib_test.go            |  2 +-
 client/lib/peers.go               |  2 +-
 client/lib/rendezvous.go          |  2 +-
 client/lib/rendezvous_ampcache.go |  2 +-
 client/lib/rendezvous_http.go     |  2 +-
 client/lib/rendezvous_test.go     |  2 +-
 client/lib/snowflake.go           | 29 ++++++++++++++++++++++++++++-
 client/lib/turbotunnel.go         |  2 +-
 client/lib/util.go                |  2 +-
 client/lib/webrtc.go              |  2 +-
 11 files changed, 38 insertions(+), 11 deletions(-)

diff --git a/client/lib/interfaces.go b/client/lib/interfaces.go
index 66b9d56..e8a5cf6 100644
--- a/client/lib/interfaces.go
+++ b/client/lib/interfaces.go
@@ -1,4 +1,4 @@
-package lib
+package snowflake_client
 
 // Tongue is an interface for catching Snowflakes. (aka the remote dialer)
 type Tongue interface {
diff --git a/client/lib/lib_test.go b/client/lib/lib_test.go
index 86601b1..f741775 100644
--- a/client/lib/lib_test.go
+++ b/client/lib/lib_test.go
@@ -1,4 +1,4 @@
-package lib
+package snowflake_client
 
 import (
 	"fmt"
diff --git a/client/lib/peers.go b/client/lib/peers.go
index 6bddbf2..1c39425 100644
--- a/client/lib/peers.go
+++ b/client/lib/peers.go
@@ -1,4 +1,4 @@
-package lib
+package snowflake_client
 
 import (
 	"container/list"
diff --git a/client/lib/rendezvous.go b/client/lib/rendezvous.go
index 689e51c..ffc0358 100644
--- a/client/lib/rendezvous.go
+++ b/client/lib/rendezvous.go
@@ -1,7 +1,7 @@
 // WebRTC rendezvous requires the exchange of SessionDescriptions between
 // peers in order to establish a PeerConnection.
 
-package lib
+package snowflake_client
 
 import (
 	"errors"
diff --git a/client/lib/rendezvous_ampcache.go b/client/lib/rendezvous_ampcache.go
index 6ac99b3..3c3780a 100644
--- a/client/lib/rendezvous_ampcache.go
+++ b/client/lib/rendezvous_ampcache.go
@@ -1,4 +1,4 @@
-package lib
+package snowflake_client
 
 import (
 	"errors"
diff --git a/client/lib/rendezvous_http.go b/client/lib/rendezvous_http.go
index 43ed075..fd80e7f 100644
--- a/client/lib/rendezvous_http.go
+++ b/client/lib/rendezvous_http.go
@@ -1,4 +1,4 @@
-package lib
+package snowflake_client
 
 import (
 	"bytes"
diff --git a/client/lib/rendezvous_test.go b/client/lib/rendezvous_test.go
index 4bc5766..0b3288b 100644
--- a/client/lib/rendezvous_test.go
+++ b/client/lib/rendezvous_test.go
@@ -1,4 +1,4 @@
-package lib
+package snowflake_client
 
 import (
 	"bytes"
diff --git a/client/lib/snowflake.go b/client/lib/snowflake.go
index 4b17f0b..3ac75b0 100644
--- a/client/lib/snowflake.go
+++ b/client/lib/snowflake.go
@@ -1,4 +1,31 @@
-package lib
+/*
+Package snowflake_client implements functionality necessary for a client to establish a connection
+to a server using Snowflake.
+
+Included in the package is a Transport type that implements the Pluggable Transports v2.1 Go API
+specification. To use Snowflake, you must first create a client from a configuration:
+
+	config := snowflake_client.ClientConfig{
+		BrokerURL:   "https://snowflake-broker.example.com";,
+		FrontDomain: "https://friendlyfrontdomain.net";,
+		Max: 1,
+		// ...
+	}
+	transport, err := snowflake_client.NewSnowflakeClient(config)
+	if err != nil {
+		// handle error
+	}
+
+The Dial function connects to a Snowflake server:
+
+	conn, err := transport.Dial()
+	if err != nil {
+		// handle error
+	}
+	defer conn.Close()
+
+*/
+package snowflake_client
 
 import (
 	"context"
diff --git a/client/lib/turbotunnel.go b/client/lib/turbotunnel.go
index 49a011c..71f01a0 100644
--- a/client/lib/turbotunnel.go
+++ b/client/lib/turbotunnel.go
@@ -1,4 +1,4 @@
-package lib
+package snowflake_client
 
 import (
 	"bufio"
diff --git a/client/lib/util.go b/client/lib/util.go
index 00b3709..42c8f97 100644
--- a/client/lib/util.go
+++ b/client/lib/util.go
@@ -1,4 +1,4 @@
-package lib
+package snowflake_client
 
 import (
 	"log"
diff --git a/client/lib/webrtc.go b/client/lib/webrtc.go
index 538cc8b..f4b775c 100644
--- a/client/lib/webrtc.go
+++ b/client/lib/webrtc.go
@@ -1,4 +1,4 @@
-package lib
+package snowflake_client
 
 import (
 	"crypto/rand"



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits