Formatting

This commit is contained in:
Sarah Jamie Lewis 2019-05-21 11:28:49 -07:00
parent b204353516
commit 9ed2848000
3 changed files with 3 additions and 9 deletions

View File

@ -1,6 +1,5 @@
package tapir
// Application defines the interface for all Tapir Applications
type Application interface {
NewInstance() Application

View File

@ -15,7 +15,6 @@ import (
"sync"
)
// Service defines the interface for a Tapir Service
type Service interface {
Start(acn connectivity.ACN, privateKey ed25519.PrivateKey, identity identity.Identity)
@ -24,7 +23,6 @@ type Service interface {
GetConnection(connectionID string) (*Connection, error)
}
// Connection defines a Tapir Connection
type Connection struct {
hostname string
@ -99,7 +97,6 @@ func (c *Connection) SetEncryptionKey(key [32]byte) {
c.encrypted = true
}
// Send writes a given message to a Tapir packet (of 1024 bytes in length).
func (c *Connection) Send(message []byte) {
@ -129,7 +126,6 @@ type BaseOnionService struct {
privateKey ed25519.PrivateKey
}
// Start initializes a BaseOnionService with a given private key and identity
// The private key is needed to initialize the Onion listen socket, ideally we could just pass an Identity in here.
func (s *BaseOnionService) Start(acn connectivity.ACN, sk ed25519.PrivateKey, id identity.Identity) {
@ -140,7 +136,6 @@ func (s *BaseOnionService) Start(acn connectivity.ACN, sk ed25519.PrivateKey, id
s.privateKey = sk
}
// GetConnection returns a connection for a given hostname.
func (s *BaseOnionService) GetConnection(connectionID string) (*Connection, error) {
conn, ok := s.connections.Load(connectionID)