Skip to content

Commit

Permalink
Fixing naming brought up in PR review
Browse files Browse the repository at this point in the history
Also ran `make fmt`
  • Loading branch information
cevian committed Nov 13, 2021
1 parent 8172504 commit 564b78d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion plugin/storage/grpc/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (c *Configuration) buildRemote(logger *zap.Logger) (*ClientPluginServices,
defer cancel()
conn, err := grpc.DialContext(ctx, c.RemoteServerAddr, opts...)
if err != nil {
return nil, fmt.Errorf("error connecting to Promscale GRPC server: %w", err)
return nil, fmt.Errorf("error connecting to remote storage: %w", err)
}

grpcClient := shared.NewGRPCClient(conn)
Expand Down
12 changes: 6 additions & 6 deletions plugin/storage/grpc/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const (
pluginConfigurationFile = "grpc-storage-plugin.configuration-file"
pluginLogLevel = "grpc-storage-plugin.log-level"
remotePrefix = "grpc-storage"
pluginServer = remotePrefix + ".server"
pluginConnectionTimeout = remotePrefix + ".connection-timeout"
remoteServer = remotePrefix + ".server"
remoteConnectionTimeout = remotePrefix + ".connection-timeout"
defaultPluginLogLevel = "warn"
defaultConnectionTimeout = time.Duration(5 * time.Second)
)
Expand All @@ -55,8 +55,8 @@ func (opt *Options) AddFlags(flagSet *flag.FlagSet) {
flagSet.String(pluginBinary, "", "The location of the plugin binary")
flagSet.String(pluginConfigurationFile, "", "A path pointing to the plugin's configuration file, made available to the plugin with the --config arg")
flagSet.String(pluginLogLevel, defaultPluginLogLevel, "Set the log level of the plugin's logger")
flagSet.String(pluginServer, "", "The server address for the remote gRPC server")
flagSet.Duration(pluginConnectionTimeout, defaultConnectionTimeout, "The connection timeout for connecting to the remote server")
flagSet.String(remoteServer, "", "The server address for the remote gRPC server")
flagSet.Duration(remoteConnectionTimeout, defaultConnectionTimeout, "The connection timeout for connecting to the remote server")

}

Expand All @@ -66,7 +66,7 @@ func (opt *Options) InitFromViper(v *viper.Viper) {
opt.Configuration.PluginBinary = v.GetString(pluginBinary)
opt.Configuration.PluginConfigurationFile = v.GetString(pluginConfigurationFile)
opt.Configuration.PluginLogLevel = v.GetString(pluginLogLevel)
opt.Configuration.RemoteServerAddr = v.GetString(pluginServer)
opt.Configuration.RemoteServerAddr = v.GetString(remoteServer)
opt.Configuration.RemoteTLS = tlsFlagsConfig.InitFromViper(v)
opt.Configuration.RemoteConnectTimeout = v.GetDuration(pluginConnectionTimeout)
opt.Configuration.RemoteConnectTimeout = v.GetDuration(remoteConnectionTimeout)
}
5 changes: 2 additions & 3 deletions plugin/storage/integration/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,16 @@ import (
"sync"
"testing"

"github.com/jaegertracing/jaeger/plugin/storage/grpc/shared"
"github.com/jaegertracing/jaeger/plugin/storage/memory"
"github.com/stretchr/testify/require"
"github.com/uber/jaeger-lib/metrics"
"go.uber.org/zap"

googleGRPC "google.golang.org/grpc"

"github.com/jaegertracing/jaeger/pkg/config"
"github.com/jaegertracing/jaeger/pkg/testutils"
"github.com/jaegertracing/jaeger/plugin/storage/grpc"
"github.com/jaegertracing/jaeger/plugin/storage/grpc/shared"
"github.com/jaegertracing/jaeger/plugin/storage/memory"
"github.com/jaegertracing/jaeger/storage/dependencystore"
"github.com/jaegertracing/jaeger/storage/spanstore"
)
Expand Down

0 comments on commit 564b78d

Please sign in to comment.