fieldalignment of all structs to save memory
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -32,9 +32,9 @@ func (t *noopTracer) Name() string {
|
||||
}
|
||||
|
||||
type noopSpan struct {
|
||||
name string
|
||||
ctx context.Context
|
||||
tracer Tracer
|
||||
name string
|
||||
}
|
||||
|
||||
func (s *noopSpan) Finish(opts ...SpanOption) {
|
||||
|
||||
@@ -14,10 +14,10 @@ type EventOption func(o *EventOptions)
|
||||
|
||||
// Options struct
|
||||
type Options struct {
|
||||
// Logger used for logging
|
||||
Logger logger.Logger
|
||||
// Name of the tracer
|
||||
Name string
|
||||
// Logger is the logger for messages
|
||||
Logger logger.Logger
|
||||
}
|
||||
|
||||
// Option func
|
||||
|
||||
@@ -36,30 +36,30 @@ type Span interface {
|
||||
}
|
||||
|
||||
type Label struct {
|
||||
key string
|
||||
val interface{}
|
||||
key string
|
||||
}
|
||||
|
||||
func Any(k string, v interface{}) Label {
|
||||
return Label{k, v}
|
||||
return Label{key: k, val: v}
|
||||
}
|
||||
|
||||
func String(k string, v string) Label {
|
||||
return Label{k, v}
|
||||
return Label{key: k, val: v}
|
||||
}
|
||||
|
||||
func Int(k string, v int) Label {
|
||||
return Label{k, v}
|
||||
return Label{key: k, val: v}
|
||||
}
|
||||
|
||||
func Int64(k string, v int64) Label {
|
||||
return Label{k, v}
|
||||
return Label{key: k, val: v}
|
||||
}
|
||||
|
||||
func Float64(k string, v float64) Label {
|
||||
return Label{k, v}
|
||||
return Label{key: k, val: v}
|
||||
}
|
||||
|
||||
func Bool(k string, v bool) Label {
|
||||
return Label{k, v}
|
||||
return Label{key: k, val: v}
|
||||
}
|
||||
|
||||
@@ -12,11 +12,11 @@ import (
|
||||
)
|
||||
|
||||
type tWrapper struct {
|
||||
opts Options
|
||||
client.Client
|
||||
serverHandler server.HandlerFunc
|
||||
serverSubscriber server.SubscriberFunc
|
||||
clientCallFunc client.CallFunc
|
||||
client.Client
|
||||
opts Options
|
||||
}
|
||||
|
||||
type ClientCallObserver func(context.Context, client.Request, interface{}, []client.CallOption, tracer.Span, error)
|
||||
|
||||
Reference in New Issue
Block a user