Skip to content

Commit

Permalink
Change casing of validation options
Browse files Browse the repository at this point in the history
  • Loading branch information
neekolas committed Oct 24, 2023
1 parent e09fca1 commit 293053a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pkg/mlsvalidate/config.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package mlsvalidate

type MlsValidationOptions struct {
GrpcAddress string `long:"grpc-address" description:"Address for the GRPC validation service"`
type MLSValidationOptions struct {
GRPCAddress string `long:"grpc-address" description:"Address for the GRPC validation service"`
}
4 changes: 2 additions & 2 deletions pkg/mlsvalidate/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ type MLSValidationServiceImpl struct {
grpcClient svc.ValidationApiClient
}

func NewMlsValidationService(ctx context.Context, options MlsValidationOptions) (*MLSValidationServiceImpl, error) {
conn, err := grpc.DialContext(ctx, options.GrpcAddress, grpc.WithTransportCredentials(insecure.NewCredentials()))
func NewMlsValidationService(ctx context.Context, options MLSValidationOptions) (*MLSValidationServiceImpl, error) {
conn, err := grpc.DialContext(ctx, options.GRPCAddress, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ type Options struct {
Tracing TracingOptions `group:"DD APM Tracing Options"`
Profiling ProfilingOptions `group:"DD APM Profiling Options" namespace:"profiling"`
MLSStore mlsstore.StoreOptions `group:"MLS Options" namespace:"mls-store"`
MlsValidation mlsvalidate.MlsValidationOptions `group:"MLS Validation Options" namespace:"mls-validation"`
MlsValidation mlsvalidate.MLSValidationOptions `group:"MLS Validation Options" namespace:"mls-validation"`
}
2 changes: 1 addition & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func New(ctx context.Context, log *zap.Logger, options Options) (*Server, error)
}

var MLSValidator mlsvalidate.MLSValidationService
if options.MlsValidation.GrpcAddress != "" {
if options.MlsValidation.GRPCAddress != "" {
MLSValidator, err = mlsvalidate.NewMlsValidationService(ctx, options.MlsValidation)
if err != nil {
return nil, errors.Wrap(err, "creating mls validation service")
Expand Down

0 comments on commit 293053a

Please sign in to comment.