fieldalignment of all structs to save memory
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -17,17 +17,16 @@ type tunBroker struct {
|
||||
}
|
||||
|
||||
type tunSubscriber struct {
|
||||
topic string
|
||||
handler broker.Handler
|
||||
opts broker.SubscribeOptions
|
||||
|
||||
closed chan bool
|
||||
opts broker.SubscribeOptions
|
||||
listener tunnel.Listener
|
||||
handler broker.Handler
|
||||
closed chan bool
|
||||
topic string
|
||||
}
|
||||
|
||||
type tunEvent struct {
|
||||
topic string
|
||||
message *broker.Message
|
||||
topic string
|
||||
}
|
||||
|
||||
// used to access tunnel from options context
|
||||
|
@@ -22,23 +22,24 @@ type Option func(*Options)
|
||||
|
||||
// Options provides network configuration options
|
||||
type Options struct {
|
||||
Name string
|
||||
// Id is tunnel id
|
||||
Id string
|
||||
// Address is tunnel address
|
||||
Address string
|
||||
// Nodes are remote nodes
|
||||
Nodes []string
|
||||
// The shared auth token
|
||||
Token string
|
||||
// Transport listens to incoming connections
|
||||
Transport transport.Transport
|
||||
// Logger
|
||||
// Logger used for logging
|
||||
Logger logger.Logger
|
||||
// Meter
|
||||
// Meter used for metrics
|
||||
Meter meter.Meter
|
||||
// Tracer
|
||||
// Tracer used for tracing
|
||||
Tracer tracer.Tracer
|
||||
// Transport used for communication
|
||||
Transport transport.Transport
|
||||
// Token the shared auth token
|
||||
Token string
|
||||
// Name holds the tunnel name
|
||||
Name string
|
||||
// Id holds the tunnel id
|
||||
Id string
|
||||
// Address holds the tunnel address
|
||||
Address string
|
||||
// Nodes holds the tunnel nodes
|
||||
Nodes []string
|
||||
}
|
||||
|
||||
// DialOption func
|
||||
@@ -61,9 +62,9 @@ type ListenOption func(*ListenOptions)
|
||||
|
||||
// ListenOptions provides listen options
|
||||
type ListenOptions struct {
|
||||
// specify mode of the session
|
||||
// Mode specify mode of the session
|
||||
Mode Mode
|
||||
// The read timeout
|
||||
// Timeout the read timeout
|
||||
Timeout time.Duration
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user