Class: Devcal::SecureClient

Inherits:
Client
  • Object
show all
Defined in:
lib/devcal.rb

Overview

The SecureClient class provides a secure connection to the Devcal service.

Instance Method Summary collapse

Methods inherited from Client

#delete_event, #get_event, #insert_event, #list_events, #update_event

Constructor Details

#initialize(addr, api_key) ⇒ SecureClient

Initializes a new SecureClient instance.

Parameters:

  • addr (String)

    The address of the Devcal service.

  • api_key (String)

    The API key for authentication.



78
79
80
81
# File 'lib/devcal.rb', line 78

def initialize(addr, api_key)
  @call_opts = {credentials: GRPC::Core::CallCredentials.new(proc { { authorization: "Bearer #{api_key}" } })}
  @stub = ::Devcal::EventsService::Stub.new(addr, GRPC::Core::ChannelCredentials.new())
end