Skip to content
This repository has been archived by the owner on Mar 23, 2022. It is now read-only.

Add attributes to tunnel to store meta information. #3

Merged
merged 1 commit into from
Mar 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ type Tunnel struct {

// Keeps current state of the tunnel.
state int32

// Attributes to store useful meta information
Attributes map[string]string
}

// NewTunnel creates a new tunnel.
Expand All @@ -111,6 +114,7 @@ func NewTunnel(conn NativeConn, dispatcher ReqDispatcher) *Tunnel {
reqDispatcher: dispatcher,
q: q,
state: stateCreated,
Attributes: make(map[string]string),
}
tunnel.closer = &closer{tunnel: tunnel, outClosed: make(chan bool, 1)}
return tunnel
Expand Down