fieldaligment

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-04-27 00:03:05 +03:00
parent 3bdfdd8fd2
commit ee11f39a2f
3 changed files with 18 additions and 18 deletions

View File

@ -19,8 +19,8 @@ import (
// Options holds client options // Options holds client options
type Options struct { type Options struct {
// CallOptions contains default CallOptions // Selector used to select needed address
CallOptions CallOptions Selector selector.Selector
// Logger used to log messages // Logger used to log messages
Logger logger.Logger Logger logger.Logger
// Tracer used for tracing // Tracer used for tracing
@ -31,30 +31,30 @@ type Options struct {
Meter meter.Meter Meter meter.Meter
// Router used to get route // Router used to get route
Router router.Router Router router.Router
// Selector used to select needed address
Selector selector.Selector
// Transport used for transfer messages // Transport used for transfer messages
Transport transport.Transport Transport transport.Transport
// Context is used for external options // Context is used for external options
Context context.Context Context context.Context
// Codecs map
Codecs map[string]codec.Codec
// Lookup func used to get destination addr // Lookup func used to get destination addr
Lookup LookupFunc Lookup LookupFunc
// Codecs map
Codecs map[string]codec.Codec
// TLSConfig specifies tls.Config for secure connection
TLSConfig *tls.Config
// Proxy is used for proxy requests // Proxy is used for proxy requests
Proxy string Proxy string
// ContentType is Used to select codec // ContentType is used to select codec
ContentType string ContentType string
// Name is the client name // Name is the client name
Name string Name string
// Wrappers contains wrappers // Wrappers contains wrappers
Wrappers []Wrapper Wrappers []Wrapper
// CallOptions contains default CallOptions
CallOptions CallOptions
// PoolSize connection pool size // PoolSize connection pool size
PoolSize int PoolSize int
// PoolTTL connection pool ttl // PoolTTL connection pool ttl
PoolTTL time.Duration PoolTTL time.Duration
// TLSConfig specifies tls.Config for secure connection
TLSConfig *tls.Config
} }
// NewCallOptions creates new call options struct // NewCallOptions creates new call options struct

View File

@ -21,8 +21,8 @@ func init() {
} }
type defaultLogger struct { type defaultLogger struct {
opts Options
enc *json.Encoder enc *json.Encoder
opts Options
sync.RWMutex sync.RWMutex
} }

View File

@ -81,10 +81,10 @@ type ServerSubscriberObserver func(context.Context, server.Message, error) []str
type Options struct { type Options struct {
// Logger that used for log // Logger that used for log
Logger logger.Logger Logger logger.Logger
// Level for logger // ServerHandlerObservers funcs
Level logger.Level ServerHandlerObservers []ServerHandlerObserver
// Enabled flag // ServerSubscriberObservers funcs
Enabled bool ServerSubscriberObservers []ServerSubscriberObserver
// ClientCallObservers funcs // ClientCallObservers funcs
ClientCallObservers []ClientCallObserver ClientCallObservers []ClientCallObserver
// ClientStreamObservers funcs // ClientStreamObservers funcs
@ -93,12 +93,12 @@ type Options struct {
ClientPublishObservers []ClientPublishObserver ClientPublishObservers []ClientPublishObserver
// ClientCallFuncObservers funcs // ClientCallFuncObservers funcs
ClientCallFuncObservers []ClientCallFuncObserver ClientCallFuncObservers []ClientCallFuncObserver
// ServerHandlerObservers funcs
ServerHandlerObservers []ServerHandlerObserver
// ServerSubscriberObservers funcs
ServerSubscriberObservers []ServerSubscriberObserver
// SkipEndpoints // SkipEndpoints
SkipEndpoints []string SkipEndpoints []string
// Level for logger
Level logger.Level
// Enabled flag
Enabled bool
} }
// Option func signature // Option func signature