Skip to content

Commit

Permalink
fixed constant names to match evaluation_pb
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Beemer <[email protected]>
  • Loading branch information
beeme1mr committed May 13, 2024
1 parent ff11baa commit f1fb741
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def initialize(configuration: nil)
end

def fetch_boolean_value(flag_key:, default_value:, evaluation_context: nil)
request = Grpc::ResolveBooleanRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
request = Grpc::Evaluation::ResolveBooleanRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
process_request(default_value) { @grpc_client.resolve_boolean(request) }
end

Expand All @@ -56,22 +56,22 @@ def fetch_number_value(flag_key:, default_value:, evaluation_context: nil)
end

def fetch_integer_value(flag_key:, default_value:, evaluation_context: nil)
request = Grpc::ResolveIntRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
request = Grpc::Evaluation::ResolveIntRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
process_request(default_value) { @grpc_client.resolve_int(request) }
end

def fetch_float_value(flag_key:, default_value:, evaluation_context: nil)
request = Grpc::ResolveFloatRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
request = Grpc::Evaluation::ResolveFloatRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
process_request(default_value) { @grpc_client.resolve_float(request) }
end

def fetch_string_value(flag_key:, default_value:, evaluation_context: nil)
request = Grpc::ResolveStringRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
request = Grpc::Evaluation::ResolveStringRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
process_request(default_value) { @grpc_client.resolve_string(request) }
end

def fetch_object_value(flag_key:, default_value:, evaluation_context: nil)
request = Grpc::ResolveObjectRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
request = Grpc::Evaluation::ResolveObjectRequest.new(flag_key: flag_key, context: prepare_evaluation_context(evaluation_context))
process_request(default_value) { @grpc_client.resolve_object(request) }
end

Expand Down Expand Up @@ -126,7 +126,7 @@ def grpc_client(configuration)
)
end

Grpc::Service::Stub.new(server_address(configuration), options).freeze
Grpc::Evaluation::Service::Stub.new(server_address(configuration), options).freeze
end

def server_address(configuration)
Expand Down

0 comments on commit f1fb741

Please sign in to comment.